Skip to content
Myr

Merge pull request #458 from frizinak/fix-autocomplete-abs

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fix auto-completion for `/`

authored by Junegunn Choi · committed by Junegunn Choi · parents e1dd798, 6208fc9 · Browse files · 2 files+4 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+4 added−2 removed

  • other:+4 added−2 removed

2 files+4 added−2 removed

modified:shell/completion.bash+2 added-1 removed
108 unmodified lines
109 while [ 1 ]; do110 if [ -z "$dir" -o -d "$dir" ]; then111 leftover=${base/#"$dir"}112 leftover=${leftover/#\/}113 [ -z "$dir" ] && dir='.' || dir="${dir/%\//}"113 [ -z "$dir" ] && dir='.'114 [ "$dir" != "/" ] && dir="${dir/%\//}"115 tput sc116 matches=$(\find -L "$dir" $1 -a -not -path "$dir" -print 2> /dev/null | sed 's@^\./@@' | $fzf $FZF_COMPLETION_OPTS $2 -q "$leftover" | while read item; do117 printf "%q$3 " "$item"118 done)
192 unmodified lines
modified:shell/completion.zsh+2 added-1 removed