aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Kearns <dkearns@users.sourceforge.net>2003-08-21 08:23:01 +0000
committerDoug Kearns <dkearns@users.sourceforge.net>2003-08-21 08:23:01 +0000
commit75ce14396bc13a3ec848097b805f8dc8e72b7527 (patch)
tree6f5c2cb9ea060af7a36f852e5c4792243a13bec7
parente438f826e34d2365a1aaf1cefdea2ac15b589129 (diff)
downloadzsh-75ce14396bc13a3ec848097b805f8dc8e72b7527.tar.gz
zsh-75ce14396bc13a3ec848097b805f8dc8e72b7527.tar.xz
zsh-75ce14396bc13a3ec848097b805f8dc8e72b7527.zip
18944: update ruby completion for version 1.8.0
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_ruby45
2 files changed, 50 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 2b296e8c6..944005395 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,11 @@
* 18947: Completion/Unix/Command/_chown: also complete options using
_arguments
+2003-08-16 Doug Kearns <djkea2@mugca.its.monash.edu.au>
+
+ * 18944: Completion/Unix/Command/_ruby: update ruby completion for
+ version 1.8.0 and add descriptions for -T matches
+
2003-08-05 Peter Stephenson <pws@csr.com>
* 18926: Src/Zle/complist.c: fix (without knowing how) insertion
diff --git a/Completion/Unix/Command/_ruby b/Completion/Unix/Command/_ruby
new file mode 100644
index 000000000..d6df7dfd2
--- /dev/null
+++ b/Completion/Unix/Command/_ruby
@@ -0,0 +1,45 @@
+#compdef ruby
+
+# ruby 1.8.0 (2003-08-14) [i686-linux]
+
+local expl curcontext="$curcontext" line state ret=1
+typeset -A opt_args
+local dirs
+
+_arguments -C -s -S \
+ '-0-[specify record separator]:input record separator in octal (default\: \0):' \
+ '-a[autosplit mode with -n or -p (splits $_ into $F)]' \
+ '-c[check syntax only]' \
+ '-C+[cd to directory, before executing your script]:directory:_files -/' \
+ '(-d --debug)'{-d,--debug}'[set debugging flags (set $DEBUG to true)]' \
+ "(1)*-e+[one line of script (several -e's allowed, omit program file)]:one line of script:" \
+ '-F-[split() pattern for autosplit (-a)]:input field separator:' \
+ '-i-[edit ARGV files in place (make backup if extension supplied)]:suffix for in-place-edit mode:(.bak)' \
+ '*-I+[specify $LOAD_PATH directory (may be used more than once)]:library directory:_files -/' \
+ '-K-[specifies KANJI (Japanese) code-set]:KANJI encoding:((e\:EUC-JP s\:Shift_JIS u\:UTF-8 N\:None))' \
+ "-l[assume 'while gets(); ... end' loop around your script]" \
+ "(-p)-n[assume 'while gets(); ... end' loop around your script]" \
+ '(-n)-p[assume loop like -n but print line also like sed]' \
+ '*-r+[require the library, before executing your script]:library name:->library' \
+ '-s[enable some switch parsing for switches after script name]' \
+ '-S[look for the script using PATH environment variable]' \
+ '-T-[turn on tainting checks]:taint level (default\: 0):((0\:strings\ from\ streams/environment/ARGV\ are\ tainted 1\:no\ dangerous\ operation\ by\ tainted\ value 2\:process/file\ operations\ prohibited 3\:all\ generated\ objects\ are\ tainted 4\:no\ global\ \(non-tainted\)\ variable\ modification/no\ direct\ output))' \
+ '(-v --verbose)'{-v,--verbose}'[print version number, then turn on verbose mode]' \
+ '-w[turn warnings on for your script]' \
+ '-W-[set warning level]:warning level (default\: 2):((0\:silent 1\:medium 2\:verbose))' \
+ '(-y --yydebug)'{-y,--yydebug}'[enable yacc debugging in the parser]' \
+ '-x-[strip off text before #!ruby line and perhaps cd to directory]:directory:_files -/' \
+ '(1 * -)--copyright[print the copyright]' \
+ '(1 * -)'{-h,--help}'[print help message]' \
+ '(1 * -)--version[print the version]' \
+ '(-)1:script file:_files -g \*.rb' \
+ '*:script argument:_files' && ret=0
+
+case $state in
+ library)
+ dirs=($(_call_program directories $words[1] -e 'puts\ \$:'))
+ _wanted directories expl library _path_files -W dirs && ret=0
+ ;;
+esac
+
+return ret