about summary refs log tree commit diff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
authorDoug Kearns <dkearns@users.sourceforge.net>2005-05-26 12:28:41 +0000
committerDoug Kearns <dkearns@users.sourceforge.net>2005-05-26 12:28:41 +0000
commit31c2d8369e6d6347599593b6272f32f15468ff81 (patch)
treeb02b86728c6e6d8b228d6ea5d878d3abc56b32c8 /Completion/Unix/Command
parentbee423bc9f8c0014ddc8c390c8de3c5df7d49761 (diff)
downloadzsh-31c2d8369e6d6347599593b6272f32f15468ff81.tar.gz
zsh-31c2d8369e6d6347599593b6272f32f15468ff81.tar.xz
zsh-31c2d8369e6d6347599593b6272f32f15468ff81.zip
21275 (modified): update raggle completion for version 0.4.0
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_raggle40
1 files changed, 29 insertions, 11 deletions
diff --git a/Completion/Unix/Command/_raggle b/Completion/Unix/Command/_raggle
index 4516e2eb7..d65b8ff2b 100644
--- a/Completion/Unix/Command/_raggle
+++ b/Completion/Unix/Command/_raggle
@@ -1,29 +1,47 @@
 #compdef raggle
 
-# Raggle v0.3.0
+# Raggle v0.4.0
 
-_arguments \
-  '(-a --add --add-feed)'{-a,--add,--add-feed}"[add a new feed (requires '--url')]" \
-  '--ascii[use ASCII characters instead of ANSI for window borders]' \
-  '(-c --config)'{-c,--config}'[specify an alternate config file]:config file:_files' \
-  '(-d --delete --delete-feed)'{-d,--delete,--delete-feed}'[delete an existing feed]:feed ID:' \
-  '(-e --edit --edit-feed)'{-e,--edit,--edit-feed}'[edit an existing feed]:feed ID:' \
+local curcontext="$curcontext" state line
+typeset -A opt_args
+
+_arguments -C -s \
+  '(-a --add)'{-a,--add}"[add a new feed (requires '--url')]" \
+  '(-A --ascii)'{-A,--ascii}'[use ASCII characters instead of ANSI for window borders]' \
+  '(-c --config)'{-c,--config}'[specify an alternate config file]:config file:_files -g "*.rb(-.)"' \
+  '--default-config[print out the default configuration of Raggle in a format suitable for your config.rb file]' \
+  '(-d --delete)'{-d,--delete}'[delete an existing feed]:feed ID:->feed' \
+  '--diag[run raggle in diagnostics/debug mode]' \
+  '(-e --edit)'{-e,--edit}'[edit an existing feed]:feed ID:->feed' \
   '(--import-opml)--export-opml[export feeds to OPML]:OPML file:_files -g "*.opml(-.)"' \
+  '(-f --find)'{-f,--find}'[find feeds containing a string, via Syndic8]:search string:' \
   "--force[force behavior Raggle won't normally allow]" \
   '(-)'{-h,--help,--usage}'[display help information]' \
   '(--export-opml)--import-opml[import feeds from an OPML file]:OPML file:_files -g "*.opml(-.)"' \
-  '(-i --invalidate)'{-i,--invalidate}'[invalidate a feed (force an update)]:feed ID:' \
+  '(-i --invalidate)'{-i,--invalidate}'[invalidate a feed (force an update)]:feed ID:->feed' \
   '(-l --list)'{-l,--list}"[list existing feeds (use '--verbose' to show URLs as well)]" \
   "--lock-title[lock Title attribute of feed (for '--add' and '--edit')]" \
-  "--max-items[set the maximum number of items for a feed (for '--add' and '--edit')]" \
+  "--max[set the maximum number of items for a feed (for '--add' and '--edit')]" \
+  '(-p --priority)'{-p,--priority}"[feed sorting priority: 0 by default, higher values will sort feeds to the top (for '--add' and '--edit')]:sorting priority:" \
   '--purge[purge deleted feeds from feed cache]' \
   '(-r --refresh)'{-r,--refresh}"[refresh attribute of feed (for '--add' and '--edit')]:refresh time (minutes):" \
   "--save-items[save old items of feed (for '--add' and '--edit')]" \
   '--server[run Raggle in HTTP server mode]:port:_ports' \
-  '(--sort --sort-feeds)'{--sort,--sort-feeds}'[sort feeds by title (case-insensitive)]' \
+  '(--sort --sort-feeds)'{--sort,--sort-feeds}'[sort feeds by priority then title (case-insensitive)]' \
   '(-t --title)'{-t,--title}"[title attribute of feed (for '--add' and '--edit')]:feed title:" \
   "--unlock-title[unlock Title attribute of feed (for '--add' and '--edit')]" \
   "--unsave-items[don't save old items of feed (for '--add' and '--edit')]" \
   '(-u --url)'{-u,--url}"[URL attribute of feed (for '--add' and '--edit')]:URL:_urls" \
   '--verbose[turn on verbose output]' \
-  '(-)'{-v,--version}'[display version information]'
+  '(-)'{-v,--version}'[display version information]' && return 0
+
+if [[ "$state" = feed ]]; then
+  local feeds
+  feeds=(
+    ${${(M)${${(f)"$(_call_program screen-sessions $words[1] \
+        --list)"}/(#s)[[:blank:]]/}:#[0-9]##,*}/, /:}
+  )
+  _describe -t feeds "RSS feed" feeds && return 0
+fi
+
+return 1