diff options
| author | Shohei YOSHIDA <syohex@gmail.com> | 2024-08-04 14:19:29 +0900 |
|---|---|---|
| committer | Shohei YOSHIDA <syohex@gmail.com> | 2024-08-04 14:19:29 +0900 |
| commit | 4dfb7a51c5ae9fa61ff0cbe94538d49676687484 (patch) | |
| tree | 4fd7ae5198ba142f760426062b1bb1b7f118cecb /src/_console | |
| parent | Update clang-tidy completion (diff) | |
| download | zsh-completions-4dfb7a51c5ae9fa61ff0cbe94538d49676687484.tar zsh-completions-4dfb7a51c5ae9fa61ff0cbe94538d49676687484.tar.gz zsh-completions-4dfb7a51c5ae9fa61ff0cbe94538d49676687484.tar.bz2 zsh-completions-4dfb7a51c5ae9fa61ff0cbe94538d49676687484.tar.lz zsh-completions-4dfb7a51c5ae9fa61ff0cbe94538d49676687484.tar.xz zsh-completions-4dfb7a51c5ae9fa61ff0cbe94538d49676687484.tar.zst zsh-completions-4dfb7a51c5ae9fa61ff0cbe94538d49676687484.zip | |
Cleanup code
Diffstat (limited to 'src/_console')
| -rw-r--r-- | src/_console | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/src/_console b/src/_console index 2d11e43..3ed8dd7 100644 --- a/src/_console +++ b/src/_console @@ -35,30 +35,38 @@ # ------- # # * loranger (https://github.com/loranger) -# * Yohan Tambè (https://github.com/Cronos87) +# * Yohan Tamb (https://github.com/Cronos87) # # ------------------------------------------------------------------------------ -_find_console () { - echo "php $(find . -maxdepth 2 -mindepth 1 -name 'console' -type f | head -n 1)" +_console_find_console() { + echo "php $(find . -maxdepth 2 -mindepth 1 -name 'console' -type f | head -n 1)" } -_console_get_command_list () { - IFS=" " - `_find_console` --no-ansi | \ - sed "1,/Available commands/d" | \ - awk '/ [a-z]+/ { print $0 }' | \ - sed -E 's/^[ ]+//g' | \ - sed -E 's/[:]+/\\:/g' | \ - sed -E 's/[ ]{2,}/\:/g' +_console_get_command_list() { + IFS=" " + `_console_find_console` --no-ansi | \ + sed "1,/Available commands/d" | \ + awk '/ [a-z]+/ { print $0 }' | \ + sed -E 's/^[ ]+//g' | \ + sed -E 's/[:]+/\\:/g' | \ + sed -E 's/[ ]{2,}/\:/g' } -_console () { - local -a commands - IFS=$'\n' - commands=(`_console_get_command_list`) - _describe 'commands' commands +_console() { + local -a commands + IFS=$'\n' + commands=(`_console_get_command_list`) + _describe 'commands' commands } compdef _console php console compdef _console console + +# Local Variables: +# mode: Shell-Script +# sh-indentation: 2 +# indent-tabs-mode: nil +# sh-basic-offset: 2 +# End: +# vim: ft=zsh sw=2 ts=2 et |
