File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ _comp_cmd_umount__linux_fstab()
7272 realcur=" $( readlink -f " $cur ." 2> /dev/null) /" ||
7373 realcur=$( readlink -f " $cur " 2> /dev/null)
7474 if [[ $realcur ]]; then
75- local dirrealcur=" " dircur=" " basecur
75+ local dirrealcur=" " dircur=. basecur
7676 if [[ $cur == * /* ]]; then
7777 dirrealcur=" ${realcur%/* } /"
7878 dircur=" ${cur%/* } /"
Original file line number Diff line number Diff line change @@ -30,11 +30,13 @@ _comp_cmd_feh()
3030 local font_path
3131 # font_path="$(imlib2-config --prefix 2>/dev/null)/share/imlib2/data/fonts"
3232 # _comp_compgen -C "$font_path" -- -f -X "!*.@([tT][tT][fF])" -S /
33- for (( i = ${# words[@]} - 1 ; i > 0 ; i-- )) ; do
33+ for (( i = ${# words[@]} - 2 ; i > 0 ; i-- )) ; do
3434 if [[ ${words[i]} == -@ (C| -fontpath) ]]; then
3535 font_path=" ${words[i + 1]} "
36- _comp_compgen -aC " $font_path " -- \
37- -f -X " !*.@([tT][tT][fF])" -S /
36+ if [[ -d $font_path ]]; then
37+ _comp_compgen -aC " $font_path " -- \
38+ -f -X " !*.@([tT][tT][fF])" -S /
39+ fi
3840 fi
3941 done
4042 compopt -o nospace
Original file line number Diff line number Diff line change @@ -63,7 +63,9 @@ _comp_cmd_sbopkg()
6363
6464 _comp_compgen_split -l -- " $( command sed -ne " s/^SLACKBUILD NAME: //p" \
6565 " $file " ) "
66- _comp_compgen -aC " $QUEUEDIR " -- -f -X " !*.sqf"
66+ if [[ -d ${QUEUEDIR-} ]]; then
67+ _comp_compgen -aC " $QUEUEDIR " -- -f -X " !*.sqf"
68+ fi
6769} &&
6870 complete -F _comp_cmd_sbopkg sbopkg
6971
You can’t perform that action at this time.
0 commit comments