mirror of https://github.com/dylanaraps/shfm.git
squish
This commit is contained in:
parent
8c31129813
commit
60f15cbd3e
14
shfm
14
shfm
|
@ -98,9 +98,7 @@ file_escape() {
|
||||||
tmp=$1 safe=
|
tmp=$1 safe=
|
||||||
|
|
||||||
# loop over string char by char
|
# loop over string char by char
|
||||||
while :; do
|
while c=${tmp%"${tmp#?}"*}; do
|
||||||
c=${tmp%"${tmp#?}"*}
|
|
||||||
|
|
||||||
case $c in
|
case $c in
|
||||||
[[:print:]]) safe=$safe$c ;;
|
[[:print:]]) safe=$safe$c ;;
|
||||||
'') return ;;
|
'') return ;;
|
||||||
|
@ -116,11 +114,7 @@ hist_search() {
|
||||||
|
|
||||||
for file do
|
for file do
|
||||||
case ${PWD%%/}/$file in
|
case ${PWD%%/}/$file in
|
||||||
"$old_pwd")
|
"$old_pwd") y=$j y2=$((j > bottom ? mid : j)) cur=$file
|
||||||
y=$j
|
|
||||||
y2=$((j > bottom ? mid : j))
|
|
||||||
cur=$file
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
j=$((j + 1))
|
j=$((j + 1))
|
||||||
|
@ -207,11 +201,11 @@ line_print() {
|
||||||
|
|
||||||
shift "$offset"
|
shift "$offset"
|
||||||
|
|
||||||
line_format "$1"
|
|
||||||
|
|
||||||
case $offset in
|
case $offset in
|
||||||
"$y") cur=$1
|
"$y") cur=$1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
line_format "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
line_format() {
|
line_format() {
|
||||||
|
|
Loading…
Reference in New Issue