summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2017-08-29 02:28:09 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2017-09-04 14:05:21 +0000
commit2c4e5c4acb5964581eae28c5fda2526c6fc6237b (patch)
tree94454e027a7356bc4d8a7f3c48cf8fb797431829
parentef9d13c3d136c38c0cdbebd30e0f91e9eb4a0000 (diff)
downloadzsh-2c4e5c4acb5964581eae28c5fda2526c6fc6237b.tar.gz
zsh-2c4e5c4acb5964581eae28c5fda2526c6fc6237b.zip
41620 (tweaked per 41622): _mkdir: Don't offer a linux-specific option in the 'zsh' variant.
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_mkdir14
2 files changed, 10 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 01fe41838..4af9acfe1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-09-04 Daniel Shahaf <d.s@daniel.shahaf.name>
+
+ * 41620 (tweaked per 41622): Completion/Unix/Command/_mkdir:
+ Don't offer a linux-specific option in the 'zsh' variant.
+
2017-09-04 Peter Stephenson <p.stephenson@samsung.com>
* 41637: Marc Aldorasi: Completion/Unix/Command/_objdump:
diff --git a/Completion/Unix/Command/_mkdir b/Completion/Unix/Command/_mkdir
index f2299f7c7..afa9cc1f8 100644
--- a/Completion/Unix/Command/_mkdir
+++ b/Completion/Unix/Command/_mkdir
@@ -9,14 +9,6 @@ args=(
'(-)*: :->directories'
)
-case "$OSTYPE" in
- linux*)
- args+=(
- '(-Z --context)'{-Z,--context=}'[set SELinux context]:SELinux context'
- )
- ;;
-esac
-
_pick_variant -r variant gnu=gnu zsh='\(eval\)' $OSTYPE --help
# It can still happen that there is a precommand command or builtin in the line.
# In such cases, the variant has to be modified suitably, after further checking
@@ -41,13 +33,17 @@ case $variant in
)
;|
gnu)
+ if [[ $OSTYPE == linux* ]]; then
+ args+=(
+ '(-Z --context)'{-Z,--context=}'[set SELinux context]:SELinux context'
+ )
+ fi
args+=(
'(- :)--help[display help information]'
'(- :)--version[display version information]'
)
;;
zsh) # remove all options
- args=( '*: :->directories' )
;;
*) # non-GNU: remove long options
args=( ${${${args:#(|*\))--*}//--[^ )]#/}/\( #\)/} )