zsh-workers
 help / color / mirror / code / Atom feed
From: Jun T <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: [PATCH] _mkdir: support macOS and builtin mkdir
Date: Tue, 23 Oct 2018 20:23:25 +0900	[thread overview]
Message-ID: <4AD96144-CFF4-454E-B479-0F550DCACED7@kba.biglobe.ne.jp> (raw)

mkdir is another command which macOS borrows from FreeBSD.
I'm sending a patch in a separate post because it has another problem:

_mkdir does not work correctly for builtin mkdir (from zsh/files module):

% zmodload zsh/files
% mkdir -<TAB>
this will list long options (--mode and --parents) in addition to -m and -p.

Simple fix is in the patch below; is this OK?


diff --git a/Completion/Unix/Command/_mkdir b/Completion/Unix/Command/_mkdir
index 53536b01d..e4308c304 100644
--- a/Completion/Unix/Command/_mkdir
+++ b/Completion/Unix/Command/_mkdir
@@ -26,7 +26,7 @@ fi
 # Now $variant is set.
 
 case $variant in
-  gnu|freebsd*|dragonfly*)
+  gnu|freebsd*|dragonfly*|darwin*)
     args+=(
       '(-v --verbose)'{-v,--verbose}'[print message for each created directory]'
     )
@@ -42,8 +42,6 @@ case $variant in
       '(- :)--version[display version information]'
     )
   ;;
-  zsh) # remove all options
-  ;;
   *) # non-GNU: remove long options
     args=( ${${${args:#(|*\))--*}//--[^ )]#/}/\( #\)/} )
   ;;



             reply	other threads:[~2018-10-23 12:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20181023120325epcas3p294de2143a70503d02a09b9c41419349d@epcas3p2.samsung.com>
2018-10-23 11:23 ` Jun T [this message]
2018-10-23 12:52   ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AD96144-CFF4-454E-B479-0F550DCACED7@kba.biglobe.ne.jp \
    --to=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).