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()
72
72
realcur=" $( readlink -f " $cur ." 2> /dev/null) /" ||
73
73
realcur=$( readlink -f " $cur " 2> /dev/null)
74
74
if [[ $realcur ]]; then
75
- local dirrealcur=" " dircur=" " basecur
75
+ local dirrealcur=" " dircur=. basecur
76
76
if [[ $cur == * /* ]]; then
77
77
dirrealcur=" ${realcur%/* } /"
78
78
dircur=" ${cur%/* } /"
Original file line number Diff line number Diff line change @@ -30,11 +30,13 @@ _comp_cmd_feh()
30
30
local font_path
31
31
# font_path="$(imlib2-config --prefix 2>/dev/null)/share/imlib2/data/fonts"
32
32
# _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
34
34
if [[ ${words[i]} == -@ (C| -fontpath) ]]; then
35
35
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
38
40
fi
39
41
done
40
42
compopt -o nospace
Original file line number Diff line number Diff line change @@ -63,7 +63,9 @@ _comp_cmd_sbopkg()
63
63
64
64
_comp_compgen_split -l -- " $( command sed -ne " s/^SLACKBUILD NAME: //p" \
65
65
" $file " ) "
66
- _comp_compgen -aC " $QUEUEDIR " -- -f -X " !*.sqf"
66
+ if [[ -d ${QUEUEDIR-} ]]; then
67
+ _comp_compgen -aC " $QUEUEDIR " -- -f -X " !*.sqf"
68
+ fi
67
69
} &&
68
70
complete -F _comp_cmd_sbopkg sbopkg
69
71
You can’t perform that action at this time.
0 commit comments