about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:17:40 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:17:40 +0000
commit062fe4c5e8e8635416d7e1ab51f33a75d3301182 (patch)
treebcb54f0d63a72fb38114fb290087a32f4f4f39a2
parenta287459b90952d4b27320541547dc3fce5e486cb (diff)
downloadzsh-062fe4c5e8e8635416d7e1ab51f33a75d3301182.tar.gz
zsh-062fe4c5e8e8635416d7e1ab51f33a75d3301182.tar.xz
zsh-062fe4c5e8e8635416d7e1ab51f33a75d3301182.zip
moved to Completion/Zsh/Type/_jobs
-rw-r--r--Completion/Base/_jobs83
1 files changed, 0 insertions, 83 deletions
diff --git a/Completion/Base/_jobs b/Completion/Base/_jobs
deleted file mode 100644
index bc52643ff..000000000
--- a/Completion/Base/_jobs
+++ /dev/null
@@ -1,83 +0,0 @@
-#autoload
-
-local expl disp jobs job jids pfx='%' desc how expls
-
-if [[ "$1" = -t ]]; then
-  zstyle -T ":completion:${curcontext}:jobs" prefix-needed &&
-      [[ "$PREFIX" != %* && compstate[nmatches] -ne 0 ]] && return 1
-  shift
-fi
-zstyle -t ":completion:${curcontext}:jobs" prefix-hidden && pfx=''
-zstyle -T ":completion:${curcontext}:jobs" verbose       && desc=yes
-
-if [[ "$1" = -r ]]; then
-  jids=( "${(@k)jobstates[(R)running*]}" )
-  shift
-  expls='running job'
-elif [[ "$1" = -s ]]; then
-  jids=( "${(@k)jobstates[(R)suspended*]}" )
-  shift
-  expls='suspended job'
-else
-  [[ "$1" = - ]] && shift
-  jids=( "${(@k)jobtexts}" )
-  expls=job
-fi
-
-if [[ -n "$desc" ]]; then
-  disp=()
-  for job in "$jids[@]"; do
-    [[ -n "$desc" ]] &&
-        disp=( "$disp[@]" "${pfx}${(r:2:: :)job} -- ${(r:COLUMNS-8:: :)jobtexts[$job]}" )
-  done
-fi
-
-zstyle -s ":completion:${curcontext}:jobs" numbers how
-
-if [[ "$how" = (yes|true|on|1) ]]; then
-  jobs=( "$jids[@]" )
-else
-  local texts i text str tmp num max=0
-
-  # Find shortest unambiguous strings.
-
-  texts=( "$jobtexts[@]" )
-  jobs=()
-  for i in "$jids[@]"; do
-    text="$jobtexts[$i]"
-    str="${text%% *}"
-    if [[ "$text" = *\ * ]]; then
-      text="${text#* }"
-    else
-      text=""
-    fi
-    tmp=( "${(@M)texts:#${str}*}" )
-    num=1
-    while [[ -n "$text" && $#tmp -ge 2 ]]; do
-      str="${str} ${text%% *}"
-      if [[ "$text" = *\ * ]]; then
-        text="${text#* }"
-      else
-        text=""
-      fi
-      tmp=( "${(@M)texts:#${str}*}" )
-      (( num++ ))
-    done
-
-    [[ num -gt max ]] && max="$num"
-
-    jobs=( "$jobs[@]" "$str" )
-  done
-
-  if [[ "$how" = [0-9]## && max -gt how ]]; then
-    jobs=( "$jids[@]" )
-  else
-    [[ -z "$pfx" && -n "$desc" ]] && disp=( "${(@)disp#%}" )
-  fi
-fi
-
-if [[ -n "$desc" ]]; then
-  _wanted jobs expl "$expls" compadd "$@" -ld disp - "%$^jobs[@]"
-else
-  _wanted jobs expl "$expls" compadd "$@" - "%$^jobs[@]"
-fi