summaryrefslogtreecommitdiffstats
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
authordana <dana@dana.is>2026-05-16 19:30:56 -0500
committerdana <dana@dana.is>2026-05-16 19:30:56 -0500
commit1502edd5940d3eace3e5da88a8e2cef89e6b4de0 (patch)
tree5e0e0f495673476d7fcc23dd052a719199b599a0 /Completion/Unix/Command
parentgithub #169: completion: update _darcs from up-stream (diff)
downloadzsh-1502edd5940d3eace3e5da88a8e2cef89e6b4de0.tar
zsh-1502edd5940d3eace3e5da88a8e2cef89e6b4de0.tar.gz
zsh-1502edd5940d3eace3e5da88a8e2cef89e6b4de0.tar.bz2
zsh-1502edd5940d3eace3e5da88a8e2cef89e6b4de0.tar.lz
zsh-1502edd5940d3eace3e5da88a8e2cef89e6b4de0.tar.xz
zsh-1502edd5940d3eace3e5da88a8e2cef89e6b4de0.tar.zst
zsh-1502edd5940d3eace3e5da88a8e2cef89e6b4de0.zip
github #169: completion: remove _darcs
now provided by up-stream (see previous commit)
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_darcs63
1 files changed, 0 insertions, 63 deletions
diff --git a/Completion/Unix/Command/_darcs b/Completion/Unix/Command/_darcs
deleted file mode 100644
index cc81ba6bb..000000000
--- a/Completion/Unix/Command/_darcs
+++ /dev/null
@@ -1,63 +0,0 @@
-#compdef darcs
-## Darcs completion snippet for zsh.
-##
-## Copyright (C) 2009 Nicolas Pouillard
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-
-local -a darcs_options darcs_non_options darcs_arguments darcs_list_options
-
-if (($CURRENT == 2)); then
- compadd -- $(darcs --commands)
-else
- # advanced zsh (array) parameter expansion fu:
- # - ${(f)...} means split into array elements at line endings
- # instead of white space
- # - ${arr:#pat} drops elements matching pat from arr, whereas
- # ${(M)arr:#pat} drops non-matching elements
- # - ${arr/pat/repl} replaces pat with repl for all elements of arr
- # - ${arr[(i)val]} is reverse indexing: returns index of first
- # occurrence of val in arr
-
- # save current word
- local current_word=$words[$CURRENT]
- # delete it from words
- words[$CURRENT]=()
- # find the index of the first option argument
- local first_opt=${words[(i)-*]}
- # insert --list-options right before the first option argument
- darcs_list_options=($words[1,$(($first_opt - 1))] --list-options $words[$first_opt,-1])
- # debugging help
- #print -l $darcs_list_options > ./debug_darcs_completion
- # execute command line with --list-options inserted and
- # split the result (stdout) at line endings
- darcs_arguments=(${(f)"$($darcs_list_options 2>/dev/null)"})
- case $current_word; in
- /*|./*|\~*|../*)
- _files
- ;;
- -*)
- darcs_options=(${${(M)darcs_arguments:#-*}/;/:})
- _describe '' darcs_options
- ;;
- *)
- case "${words[2]}"; in
- get|clone)
- _urls
- ;;
- *)
- darcs_non_options=(${darcs_arguments:#-*})
- _multi_parts -i -S ' ' / darcs_non_options
- ;;
- esac
- ;;
- esac
-fi