about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:28:31 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:28:31 +0000
commit782606aad434dc82f6d6b1d27cc9dc62ecf6e513 (patch)
tree261ceddd0c0e648eb2f395a7473345241ff32990 /Completion
parentc292f3a1b23b095d567647201b902d58ce2ce692 (diff)
downloadzsh-782606aad434dc82f6d6b1d27cc9dc62ecf6e513.tar.gz
zsh-782606aad434dc82f6d6b1d27cc9dc62ecf6e513.tar.xz
zsh-782606aad434dc82f6d6b1d27cc9dc62ecf6e513.zip
moved from Completion/Builtins/_fc
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Zsh/Command/_fc36
1 files changed, 36 insertions, 0 deletions
diff --git a/Completion/Zsh/Command/_fc b/Completion/Zsh/Command/_fc
new file mode 100644
index 000000000..40d88db27
--- /dev/null
+++ b/Completion/Zsh/Command/_fc
@@ -0,0 +1,36 @@
+#compdef fc history r
+
+local expl fc_common fc_hist fc_r
+
+fc_common=(
+  '(-A -R -W -I)-r[reverse order of the commands]'
+  '(-A -R -W -I -e)-n[suppress line numbers]'
+  '(-A -R -W -I)*::commands:_command_names -e' )
+
+fc_hist=( \
+  '(-A -R -W -I)-m[treat first argument as a pattern]'
+  '(-A -R -W -I -e -f -E -i)-d[print time-stamps]'
+  '(-A -R -W -I -e -d -E -i)-f[mm/dd/yyyy format time-stamps]'
+  '(-A -R -W -I -e -d -f -i)-E[dd.mm.yyyy format time-stamps]'
+  '(-A -R -W -I -e -d -f -E)-i[yyyy-mm-dd format time-stamps]'
+  '(-A -R -W -I -e)-D[print elapsed times]' )
+
+fc_r='(-A -R -W -I -e)-l[list resulting commands on stdout]'
+
+case $service in
+  history)
+    _arguments -C -s -S "$fc_common[@]" "$fc_hist[@]" && return 0
+  ;;
+  r)
+    _arguments -C -s -S "$fc_common[@]" "$fc_r" && return 0
+  ;;
+  *)
+  _arguments -C -s -S \
+    '(-A -R -W -I -l -n -d -f -E -i -D)-e[specify editor to invoke]:editor to invoke:_command_names -e' \
+    '(-l -m -e -r -n -d -f -E -i -D -A -W *)-R[read history from file]:history file:_files' \
+    '(-l -m -e -r -n -d -f -E -i -D -R -W *)-A[append history to file]:history file:_files' \
+    '(-l -m -e -r -n -d -f -E -i -D -R -A *)-W[write history to file]:history file:_files' \
+    '(-l -m -e -r -n -d -f -E -i -D -A -W *)-I[read/write new events only]:history file:_files' \
+    "$fc_common[@]" "$fc_hist[@]" "$fc_r" && return 0
+  ;;
+esac