Add url command to {en,de}code text
This commit is contained in:
22
url/_url
Normal file
22
url/_url
Normal file
@@ -0,0 +1,22 @@
|
||||
#compdef url
|
||||
|
||||
_url() {
|
||||
local ret=1 context curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C -w -s \
|
||||
'(-h --help)'{-h,--help}'[show this help message and exit]' \
|
||||
'1: :->command'
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
declare -a commands
|
||||
local commands=(
|
||||
encode:'encode unencoded text'
|
||||
decode:'decode encoded text'
|
||||
)
|
||||
_describe -t commands command commands && ret=0 ;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
Reference in New Issue
Block a user