summaryrefslogtreecommitdiffstats
path: root/zsh/oh-my-zsh/plugins/scd/_scd
diff options
context:
space:
mode:
authorLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2024-03-25 16:43:09 +0530
committerLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2024-03-25 16:43:09 +0530
commita62114c91f2070c8c8453d117f3d81dc113e41ff (patch)
treef266e87af29a08c01f82bc32dd7d463d8ec4441a /zsh/oh-my-zsh/plugins/scd/_scd
parentaf120ab348f2e1a5a39dec035ed9dcf84189a64e (diff)
downloaddotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.tar.gz
dotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.tar.bz2
dotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.zip
dotfile update
Diffstat (limited to 'zsh/oh-my-zsh/plugins/scd/_scd')
-rw-r--r--zsh/oh-my-zsh/plugins/scd/_scd60
1 files changed, 0 insertions, 60 deletions
diff --git a/zsh/oh-my-zsh/plugins/scd/_scd b/zsh/oh-my-zsh/plugins/scd/_scd
deleted file mode 100644
index 39c7fa4..0000000
--- a/zsh/oh-my-zsh/plugins/scd/_scd
+++ /dev/null
@@ -1,60 +0,0 @@
-#compdef scd
-#description smart change directory
-
-local curcontext="$curcontext" state line expl ret=1
-typeset -A opt_args
-
-local -a indexopts myargs
-indexopts=( --add -a --unindex )
-
-myargs=(
- # common options
- "(--help -h)"{--help,-h}"[print help and exit]"
-
- # options for manipulating directory index
- - index
- "(--recursive -r)"{--recursive,-r}"[use recursive --add or --unindex]"
- "($indexopts)"{--add,-a}"[add specified directories to the index]"
- "($indexopts)--unindex[remove specified directories from the index]"
- "*:directory:{ (( ${words[(I)-a|--add|--unindex]} )) && _path_files -/ }"
-
- # define new directory alias
- - alias
- "--alias=[create alias for this or given directory]:directory-alias:()"
- '1:directory:{ (( words[(I)--alias*] )) && _path_files -/ }'
-
- # remove definition of directory alias
- - unalias
- "--unalias[remove definition of directory alias]"
- "*::directory alias:->scd-alias-target"
-
- # act on the directory change
- - scd
- "(--all -A)"{--all,-A}"[include less likely and ignored paths]"
- "--list[print matching directories and exit]"
- "(--verbose -v)"{--verbose,-v}"[show directory ranking and full paths]"
- "(--push -p)"{--push,-p}"[change directory with 'pushd']"
- "1::directory alias:->scd-alias-target"
- "*:patterns:()"
-)
-
-_arguments -S -C $myargs && ret=0
-
-
-if [[ "$state" == scd-alias-target && -s ~/.scdalias.zsh ]]; then
- local -a scdaliases
- scdaliases=( )
- eval "$(setopt extendedglob
- phome="(#b)(#s)${HOME}(/*)#(#e)"
- builtin hash -dr
- source ~/.scdalias.zsh &&
- for k v in ${(kv)nameddirs}; do
- scdaliases+=( $k:${v/${~phome}/"~"${match[1]}} )
- done
- complete_unalias=${+opt_args[unalias---unalias]}
- if (( complete_unalias && ! ${+nameddirs[OLD]} )); then
- scdaliases+=( 'OLD:all aliases to non-existent paths' )
- fi
- typeset -p scdaliases )"
- _describe -t scdaliases scdalias scdaliases
-fi