diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Completion/Unix/Command/_nice | 14 | ||||
-rw-r--r-- | Completion/Zsh/Command/_precommand | 2 |
3 files changed, 18 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index c07c2e845..8cc48401f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2003-07-09 Peter Stephenson <pws@csr.com> + * 18839, modified c.f. 18840: Completion/Unix/Command/_nice, + Completion/Zsh/Command/_precommand: Completion for nice. + * unposted: Config/version.mk: rebrand as 4.1.1-dev-1 to avoid confusion with release version. diff --git a/Completion/Unix/Command/_nice b/Completion/Unix/Command/_nice new file mode 100644 index 000000000..f2f688368 --- /dev/null +++ b/Completion/Unix/Command/_nice @@ -0,0 +1,14 @@ +#compdef nice + +shift words +(( CURRENT-- )) + +if [[ $CURRENT -gt 1 && $words[1] = [-+](-|)<-> ]]; then + shift words + (( CURRENT -- )) +elif [[ $CURRENT -gt 2 && $words[1] = -n ]]; then + shift 2 words + (( CURRENT -= 2 )) +fi + +_normal diff --git a/Completion/Zsh/Command/_precommand b/Completion/Zsh/Command/_precommand index bcda9fc8b..e48094721 100644 --- a/Completion/Zsh/Command/_precommand +++ b/Completion/Zsh/Command/_precommand @@ -1,4 +1,4 @@ -#compdef - nohup nice eval time rusage noglob nocorrect exec +#compdef - nohup eval time rusage noglob nocorrect exec shift words (( CURRENT-- )) |