slapt-src: split options from their arguments
This commit is contained in:
parent
8566a5a896
commit
3a65be4a18
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
_slapt_src()
|
_slapt_src()
|
||||||
{
|
{
|
||||||
local cur prev words cword
|
local cur prev words cword split
|
||||||
_init_completion -n : || return
|
_init_completion -s -n : || return
|
||||||
|
|
||||||
case "$prev" in
|
case "$prev" in
|
||||||
--config|-c)
|
--config|-c)
|
||||||
@ -16,6 +16,8 @@ _slapt_src()
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
$split && return
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help )' -- "$cur" ) )
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help )' -- "$cur" ) )
|
||||||
[[ $COMPREPLY == *= ]] && compopt -o nospace
|
[[ $COMPREPLY == *= ]] && compopt -o nospace
|
||||||
|
Loading…
x
Reference in New Issue
Block a user