File: _nice

package info (click to toggle)
zsh-beta 4.3.6-dev-0%2B20080723-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 14,752 kB
  • ctags: 7,403
  • sloc: ansic: 90,889; sh: 5,568; makefile: 836; perl: 745; awk: 381; sed: 16
file content (14 lines) | stat: -rw-r--r-- 246 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#compdef nice

shift words
(( CURRENT-- ))

if [[ $CURRENT -gt 1 && $words[1] = ([-+](-|)|-n)<-> ]]; then
    shift words
    (( CURRENT -- ))
elif [[ $CURRENT -gt 2 && $words[1] = -n ]]; then
    shift 2 words
    (( CURRENT -= 2 ))
fi

_normal