zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] _mkdir: support macOS and builtin mkdir
@ 2018-10-23 11:23 ` Jun T
  2018-10-23 12:52   ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Jun T @ 2018-10-23 11:23 UTC (permalink / raw)
  To: zsh-workers

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:#(|*\))--*}//--[^ )]#/}/\( #\)/} )
   ;;



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] _mkdir: support macOS and builtin mkdir
  2018-10-23 11:23 ` [PATCH] _mkdir: support macOS and builtin mkdir Jun T
@ 2018-10-23 12:52   ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2018-10-23 12:52 UTC (permalink / raw)
  To: zsh-workers

On Tue, 2018-10-23 at 20:23 +0900, Jun T wrote:
> mkdir is another command which macOS borrows from FreeBSD.
> _mkdir does not work correctly for builtin mkdir (from zsh/files module):
> 
> Simple fix is in the patch below; is this OK?

Seems reasonable; it's simple and standard enough there's hardly any
point in writing a special completion.

pws

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-23 13:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20181023120325epcas3p294de2143a70503d02a09b9c41419349d@epcas3p2.samsung.com>
2018-10-23 11:23 ` [PATCH] _mkdir: support macOS and builtin mkdir Jun T
2018-10-23 12:52   ` Peter Stephenson

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).