Adding artisan & art autocomplete in BASH
This commit is contained in:
parent
93bf686ca5
commit
0d08d36bd3
|
@ -148,3 +148,14 @@ function fs() {
|
||||||
du $arg .[^.]* ./*;
|
du $arg .[^.]* ./*;
|
||||||
fi;
|
fi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Add artisan autocomplete
|
||||||
|
function _artisan()
|
||||||
|
{
|
||||||
|
COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
|
||||||
|
COMMANDS=`php artisan --raw --no-ansi list | sed "s/[[:space:]].*//g"`
|
||||||
|
COMPREPLY=(`compgen -W "$COMMANDS" -- "${COMP_WORDS[COMP_CWORD]}"`)
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
complete -F _artisan art
|
||||||
|
complete -F _artisan artisan
|
||||||
|
|
Loading…
Reference in New Issue