buku/auto-completion/zsh/_buku
shv-q3 9dcbd67ac5 implement feature "Support custom colours" (#197)
* implement "Support custom colours" from (#174)

# imported collections module for named tuple
# add "colormap" from googler project
# add named tuple for id and title, url, desc, tag
# adjusted print_single_rec so colors can be changed for each item
# add valid color string checker from googler
# adjusted man options
# add autocompletions

* Hotfix - implement "Support custom colours" from (#174)
# sorted import in alphabetical order
# adjusted var name's
# add colors table to man file
# add color os ENV option
# add --color documentation in README under "Usage"

* fix typo error in man page color section

* Update buku-completion.bash

--color reordered in alphabetical order

* Update buku.fish

--color reordered in alphabetical order

* Update _buku

--color reordered in alphabetical order

* Hotfix2 - implement "Support custom colours" - restructure feature
# separated id from ID_str and ID_DB_STR so it can have separate color
# add 5 string color for (id, title, url, desc, tag)
# adjusted print_single_rec for 5 colors result
# fixed syntax .BI \--colors " COLORS" in man page
# replaced four with five letter string for color
# fixed default colors to "GKlxe" and "\x1b[2m" for DB index
# add example to README and man page
# removed check for colorstr_env set by user for the moment

* Fixed reviews

* Review fixes
2017-08-23 03:39:43 +05:30

52 lines
2.3 KiB
Plaintext

#compdef buku
#
# Completion definition for buku.
#
# Author:
# Arun Prakash Jana <engineerarun@gmail.com>
#
setopt localoptions noshwordsplit noksharrays
local -a args
args=(
'(-a --add)'{-a,--add}'[add bookmark]:URL tags'
'(--ai)--ai[auto-import bookmarks]'
'(--colors)--colors[set output colors]:color string'
'(-c --comment)'{-c,--comment}'[comment on bookmark]'
'(-d --delete)'{-d,--delete}'[delete bookmark]'
'(--deep)--deep[search matching substrings]'
'(-e --export)'{-e,--export}'[export bookmarks]:html output file'
'(--expand)--expand[expand a tny.im shortened URL]:index/shorturl'
'(-f --format)'{-f,--format}'[limit fields in print and Json output]:value'
'(-h --help)'{-h,--help}'[show help]'
'(-i --import)'{-i,--import}'[import bookmarks]:html imput file'
'(--immutable)--immutable[disable title update from web]:value'
'(-j --json)'{-j,--json}'[show Json output for print and search]'
'(-k --unlock)'{-k,--unlock}'[decrypt database]'
'(-l --lock)'{-l,--lock}'[encrypt database]'
'(-m --merge)'{-m,--merge}'[merge another buku database]:buku db file'
'(--nc)--nc[disable color output]'
'(--np)--np[noninteractive mode]'
'(-o --open)'{-o,--open}'[open bookmarks in browser]'
'(--oa)--oa[browse all search results immediately]'
'(-p --print)'{-p,--print}'[show bookmark details]'
'(-r --sreg)'{-r,--sreg}'[match a regular exression]:regex'
'(--replace)--replace[replace a tag]:tag to replace'
'(-s --sany)'{-s,--sany}'[match any keyword]:keyword(s)'
'(-s --sall)'{-s,--sall}'[match all keywords]:keyword(s)'
'(--shorten)--shorten[shorten a URL using tny.im]:index/url'
'(--suggest)--suggest[show a list of similar tags]'
'(-t --stag)'{-t,--stag}'[search by tag or show tags]'
'(--tacit)--tacit[reduce verbosity]'
'(--tag)--tag[set tags, use + to append, - to remove]'
'(--threads)--threads[max connections for full refresh]:value'
'(--title)--title[set custom title]'
'(-u --update)'{-u,--update}'[update bookmark]'
'(--url)--url[set url]:url'
'(-V)-V[check latest upstream release]'
'(-v --version)'{-v,--version}'[show program version]'
'(-w --write)'{-w,--write}'[open editor]'
'(-z --debug)'{-z,--debug}'[enable debugging mode]'
)
_arguments -S -s $args