File tree Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -60,13 +60,17 @@ _comp_cmd_slapt_get()
60
60
# slapt-get will fail to search for "^name-version"
61
61
# it can search for names only
62
62
local name=${cur%% -* }
63
- COMPREPLY=($( LC_ALL=C " $1 " -c " $config " --search " ^$name " \
64
- 2> /dev/null | LC_ALL=C command sed -ne " /^$cur /{s/ .*$//;p;}" ) )
63
+ _comp_compgen_split -l -- " $(
64
+ LC_ALL=C " $1 " -c " $config " --search " ^$name " 2> /dev/null |
65
+ LC_ALL=C command sed -ne " /^$cur /{s/ .*$//;p;}"
66
+ ) "
65
67
return
66
68
;;
67
69
avl) # --install|-i|
68
- COMPREPLY=($( LC_ALL=C " $1 " -c " $config " --available \
69
- 2> /dev/null | LC_ALL=C command sed -ne " /^$cur /{s/ .*$//;p;}" ) )
70
+ _comp_compgen_split -l -- " $(
71
+ LC_ALL=C " $1 " -c " $config " --available 2> /dev/null |
72
+ LC_ALL=C command sed -ne " /^$cur /{s/ .*$//;p;}"
73
+ ) "
70
74
return
71
75
;;
72
76
ins) # --remove|--filelist
Original file line number Diff line number Diff line change @@ -56,12 +56,17 @@ _comp_cmd_slapt_src()
56
56
57
57
if [[ $cur == * :* ]]; then
58
58
local name=${cur%:* }
59
- COMPREPLY=($( LC_ALL=C " $1 " --config " $config " --search " ^$name " \
60
- 2> /dev/null | LC_ALL=C command sed -ne \
61
- " /^$cur /{s/^$name :\([^ ]*\) .*$/\1/;p;}" ) )
59
+ _comp_compgen_split -l -- " $(
60
+ LC_ALL=C
61
+ " $1 " --config " $config " --search " ^$name " 2> /dev/null |
62
+ command sed -ne " /^$cur /{s/^$name :\([^ ]*\) .*$/\1/;p;}"
63
+ ) "
62
64
else
63
- COMPREPLY=($( LC_ALL=C " $1 " --config " $config " --search " ^$cur " \
64
- 2> /dev/null | LC_ALL=C command sed -ne " /^$cur /{s/ .*$//;p;}" ) )
65
+ _comp_compgen_split -l -- " $(
66
+ LC_ALL=C
67
+ " $1 " --config " $config " --search " ^$cur " 2> /dev/null |
68
+ command sed -ne " /^$cur /{s/ .*$//;p;}"
69
+ ) "
65
70
fi
66
71
} &&
67
72
complete -F _comp_cmd_slapt_src slapt-src
You can’t perform that action at this time.
0 commit comments