Add zsh completion support
Both bash and zsh completions could be supported using single file.
This commit is contained in:
committed by
borgmanJeremy
parent
d72d1e6ad9
commit
23ae6c1579
@@ -1,5 +1,8 @@
|
||||
# bash-completion for flameshot command
|
||||
#compdef flameshot
|
||||
|
||||
# Shell completion for flameshot command
|
||||
# To be installed in "/usr/share/bash-completion/completions/flameshot"
|
||||
# and "/usr/share/zsh/site-functions/"
|
||||
|
||||
_flameshot() {
|
||||
local prev cur cmd gui_opts full_opts config_opts
|
||||
@@ -64,4 +67,10 @@ _flameshot() {
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
if [[ -n ${ZSH_VERSION} ]]; then
|
||||
autoload -U bashcompinit
|
||||
bashcompinit
|
||||
fi
|
||||
|
||||
complete -F _flameshot flameshot
|
||||
Reference in New Issue
Block a user