Skip to content

Commit 0ae9c34

Browse files
author
Kevin Buchholz
committed
artisan auto completion
1 parent d55f3fb commit 0ae9c34

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

home/app/.bashrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,14 @@ alias seed="artisan migrate:fresh --seed"
66
# prompt colors and short user display
77
force_color_prompt=yes
88
PS1='\[\033[1;36m\]\u\[\033[1;31m\]\[\033[1;32m\]:\[\033[1;35m\]\w\[\033[1;31m\]\$\[\033[0m\] '
9+
10+
# artisan autocompletion
11+
_artisan()
12+
{
13+
COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
14+
COMMANDS=`artisan --raw --no-ansi list | sed "s/[[:space:]].*//g"`
15+
COMPREPLY=(`compgen -W "$COMMANDS" -- "${COMP_WORDS[COMP_CWORD]}"`)
16+
return 0
17+
}
18+
19+
complete -F _artisan artisan

0 commit comments

Comments
 (0)