aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/completions/canto.fish
diff options
context:
space:
mode:
authorGravatar Johann Weging <johann@weging.net>2013-06-02 15:26:36 +0200
committerGravatar Konrad Borowski <glitchmr@myopera.com>2013-07-19 09:24:00 +0200
commit51ae9b3ed435f740672df5ed092e4ce95e3f4dbc (patch)
treee0eb18399cbe375279c88571853d8a7d160d3b2e /share/completions/canto.fish
parent4726221d181fd71a94cdaba2328f1f5c911208e8 (diff)
Add completion for canto.
Diffstat (limited to 'share/completions/canto.fish')
-rw-r--r--share/completions/canto.fish35
1 files changed, 35 insertions, 0 deletions
diff --git a/share/completions/canto.fish b/share/completions/canto.fish
new file mode 100644
index 00000000..ad75b4cf
--- /dev/null
+++ b/share/completions/canto.fish
@@ -0,0 +1,35 @@
+
+function __fish_canto_using_command
+ set cmd (commandline -opc)
+ if [ (count $cmd) -gt 1 ]
+ if [ $argv[1] = $cmd[2] ]
+ return 0
+ end
+ if [ count $argv -gt 2 ]
+ if [ $argv[2] = $cmd[2] ]
+ return 0
+ end
+ end
+ end
+ return 1
+end
+
+
+complete -f -c canto -s h -l help -d 'Show Help'
+complete -f -c canto -s v -l version -d 'Show version'
+complete -f -c canto -s u -l update -d 'Update before running'
+complete -f -c canto -s l -l list -d 'List feeds'
+complete -f -c canto -s a -l checkall -d 'Show number of new items'
+
+complete -f -c canto -s n -l checknew -d 'Show number of new items for feed'
+complete -f -c canto -n '__fish_canto_using_command -l --checknew' -d 'Feed' -a '(command canto -l)'
+
+complete -c canto -s o -l opml -d 'Print conf as OPML'
+complete -c cnato -s i -l import -d 'Import from OPML'
+complete -f -c canto -s r -l url -d 'Add feed'
+
+complete -c canto -s D -l dir -d 'Set configuration directory'
+complete -c canto -s C -l conf -d 'Set configuration file'
+complete -c canto -s L -l log -d 'Set client log file'
+complete -c canto -s F -l fdir -d 'Set feed directory'
+complete -c canto -s S -l sdir 'Set script directory'