about summary refs log tree commit diff
path: root/Completion/Builtins
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:35:18 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:35:18 +0000
commitb2a1d1e5d0c4f44a2de0e9e098dd2189c666d543 (patch)
treeb80f91c147e49928811903816014350b5938b081 /Completion/Builtins
parenta97966bb1b36bca09e43bc170fc55bc279e226ba (diff)
downloadzsh-b2a1d1e5d0c4f44a2de0e9e098dd2189c666d543.tar.gz
zsh-b2a1d1e5d0c4f44a2de0e9e098dd2189c666d543.tar.xz
zsh-b2a1d1e5d0c4f44a2de0e9e098dd2189c666d543.zip
moved to Completion/Unix/Type/_pids
Diffstat (limited to 'Completion/Builtins')
-rw-r--r--Completion/Builtins/_pids56
1 files changed, 0 insertions, 56 deletions
diff --git a/Completion/Builtins/_pids b/Completion/Builtins/_pids
deleted file mode 100644
index b298322e2..000000000
--- a/Completion/Builtins/_pids
+++ /dev/null
@@ -1,56 +0,0 @@
-#autoload
-
-# If given the `-m <pattern>' option, this tries to complete only pids
-# of processes whose command line match the `<pattern>'.
-
-local out pids list expl match desc listargs args all nm ret=1
-
-_tags processes || return 1
-
-if [[ "$1" = -m ]]; then
-  all=()
-  match="*[[:blank:]]${PREFIX}[0-9]#${SUFFIX}[[:blank:]]*[/[:blank:]]${2}*"
-  shift 2
-elif [[ "$PREFIX$SUFFIX" = ([%-]*|[0-9]#) ]]; then
-  all=()
-  match="(*[[:blank:]]|)${PREFIX}[0-9]#${SUFFIX}[[:blank:]]*"
-else
-  all=(-U)
-  match="*[[:blank:]]*[[/[:blank:]]$PREFIX*$SUFFIX*"
-  nm="$compstate[nmatches]"
-fi
-
-zstyle -s ":completion:${curcontext}:processes" command args
-
-out=( "${(@f)$(_call processes ps 2>/dev/null)}" )
-desc="$out[1]"
-out=( "${(@M)out[2,-1]:#${~match}}" )
-
-if [[ "$desc" = (#i)(|*[[:blank:]])pid(|[[:blank:]]*) ]]; then
-  pids=( "${(@)${(@M)out#${(l.${#desc[1,(r)(#i)[[:blank:]]pid]}..?.)~:-}[^[:blank:]]#}##*[[:blank:]]}" )
-else
-  pids=( "${(@)${(@M)out##[^0-9]#[0-9]#}##*[[:blank:]]}" )
-fi
-
-if zstyle -T ":completion:${curcontext}:processes" verbose; then
-  list=( "${(@Mr:COLUMNS-1:)out}" )
-  desc=(-ld list)
-else
-  desc=()
-fi
-
-_wanted processes expl 'process ID' \
-    compadd "$@" "$desc[@]" "$all[@]" -a pids && ret=0
-
-if [[ -n "$all" ]]; then
-  zstyle -s ":completion:${curcontext}:processes" insert-ids out || out=menu
-
-  case "$out" in
-  menu)   compstate[insert]=menu ;;
-  single) [[ $compstate[nmatches] -ne nm+1 ]] && compstate[insert]= ;;
-  *)      [[ ${#:-$PREFIX$SUFFIX} -gt ${#compstate[unambiguous]} ]] &&
-              compstate[insert]=menu ;;
-  esac
-fi
-
-return ret