Zshだとプラグイン用意されている。
oh-my-zsh/plugins/symfony2 at master · robbyrussell/oh-my-zsh · GitHub
Fishだと用意されていないので、自分で作ってみた。
1
2
3
4
5
6
7
8
9
10
11
|
# ~/.config/fish/conf.d/symfony.fish
function _symfony_console
php (find . -maxdepth 2 -mindepth 1 -name 'console' -type f | head -n 1)
end
function _symfony_get_command_list
_symfony_console --no-ansi | sed "1,/Available commands/d" | awk '/^ ?[^ ]+ / { print $1 }'
end
complete -f -c "console" -a "(_symfony_get_command_list)"
|
しかしanyenv使えなかったり地味に辛いのでzshに戻したくなっている・・・。