Update auto-completion scripts (--url, --tag)

This commit is contained in:
Arun Prakash Jana 2016-05-21 19:02:01 +05:30
parent 8ca31e6ce8
commit 6e8539bf81
No known key found for this signature in database
GPG Key ID: C0A712ED95043DCB
3 changed files with 6 additions and 2 deletions

View File

@ -10,8 +10,8 @@ _buku () {
local IFS=$' \n'
local cur=$2 prev=$3
local -a opts opts_with_args
opts=(-a --add -c --comment -d --delete -h --help -k --unlock -l --lock -o --open
-p --print -r --replace -s --sany -S --sall --st --stag -t --title -u --update)
opts=(-a --add -c --comment -d --delete -h --help -k --unlock -l --lock -o --open -p --print
-r --replace -s --sany -S --sall --st --stag --tag -t --title -u --update --url)
opts_with_arg=(-a --add -o --open -r --replace -s --sany -S --sall)
# Do not complete non option names

View File

@ -16,5 +16,7 @@ complete -c buku -s r -l replace -r --description 'replace a tag'
complete -c buku -s s -l sany -r --description 'search any keyword'
complete -c buku -s S -l sall -r --description 'search all keywords'
complete -c buku -l st -l stag --description 'search by tag or show tags'
complete -c buku -l tag --description 'set tags'
complete -c buku -s t -l title --description 'set custom title'
complete -c buku -s u -l update --description 'update bookmark'
complete -c buku -l url --description 'set url'

View File

@ -21,7 +21,9 @@ args=(
'(-s --sany)'{-s,--sany}'[search any keyword]:keyword(s)'
'(-s --sall)'{-s,--sall}'[search all keywords]:keyword(s)'
'(-st --stag)'{--st,--stag}'[search by tag or show tags]'
'(--tag)'{--tag}'[set tags]'
'(-t --title)'{-t,--title}'[set custom title]'
'(-u --update)'{-u,--update}'[update bookmark]'
'(--url)'{--url}'[set url]'
)
_arguments -S -s $args