From 5e592fd9b0d0d5a0532ffa57667b3f5e7c09fa92 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Tue, 21 Oct 2014 20:53:51 +0200 Subject: 33485: fixes for zstyle context handling --- Completion/Unix/Command/_su | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'Completion/Unix/Command/_su') diff --git a/Completion/Unix/Command/_su b/Completion/Unix/Command/_su index 6d0f2cd9f..9d3f28066 100644 --- a/Completion/Unix/Command/_su +++ b/Completion/Unix/Command/_su @@ -1,9 +1,9 @@ #compdef su local -A opt_args -local -a args state context +local -a args context state line expl local shell=${words[(i)(-s|--shell=*)]} first='1:user name:_users' -local usr=root line +local usr=root if _pick_variant gnu="Free Software Foundation" unix --version; then args=( @@ -20,10 +20,20 @@ if _pick_variant gnu="Free Software Foundation" unix --version; then ) else args=( - '-c[pass command to shell]:command string:->command' '-l[use a login shell]' '-s[run the specified shell]:shell:->shell' ) + case $OSTYPE in + freebsd*) + args=( + '-c[use settings from specified login class]:class' + '-f[if the invoked shell is csh, prevent it from reading .cshrc]' + '-l[use a login shell]' + '-m[do not reset environment]' + '-s[set the MAC label]' + ) + *) args+=( '-c[pass command to shell]:command string:->command' ) ;; + esac fi if [[ $#words -ge 2 && $words[2] != -* && CURRENT -ne 2 ]]; then @@ -50,11 +60,11 @@ case $state in return ;; (shell) - compadd ${(f)^"$( Date: Fri, 24 Oct 2014 08:55:26 +0200 Subject: 33485: fix a missing ;; case terminator --- ChangeLog | 5 +++++ Completion/Unix/Command/_su | 1 + 2 files changed, 6 insertions(+) (limited to 'Completion/Unix/Command/_su') diff --git a/ChangeLog b/ChangeLog index 970c45edc..7deab9a57 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-10-24 Mikael Magnusson + + * 33485: Completion/Unix/Command/_su: fix a missing ;; case + terminator + 2014-10-23 Oliver Kiddle * 33520: Src/Zle/zle_vi.c, Test/X02zlevi.ztst: correct cursor diff --git a/Completion/Unix/Command/_su b/Completion/Unix/Command/_su index 9d3f28066..057a41371 100644 --- a/Completion/Unix/Command/_su +++ b/Completion/Unix/Command/_su @@ -32,6 +32,7 @@ else '-m[do not reset environment]' '-s[set the MAC label]' ) + ;; *) args+=( '-c[pass command to shell]:command string:->command' ) ;; esac fi -- cgit v1.2.3