zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] _du: add support for Mac OS X
@ 2013-04-20  1:18 Jun T.
  2013-04-20  9:59 ` Frank Terbeck
  0 siblings, 1 reply; 4+ messages in thread
From: Jun T. @ 2013-04-20  1:18 UTC (permalink / raw)
  To: zsh-workers

2nd try


---
 Completion/Unix/Command/_du |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/Completion/Unix/Command/_du b/Completion/Unix/Command/_du
index 9974d72..9ae6e9c 100644
--- a/Completion/Unix/Command/_du
+++ b/Completion/Unix/Command/_du
@@ -47,6 +47,24 @@ if _pick_variant gnu=Free\ Soft unix --version /dummy/no-such-file; then
 
   return ret
 
+elif [[ "$OSTYPE" == darwin* ]]; then
+  _arguments -s -A "-*" \
+    '(-H -L -P)-H[follow symlinks on the command line]' \
+    '(-H -L -P)-L[follow all symlinks]' \
+    '(-H -L -P)-P[do not follow symlinks (default)]' \
+    '*-I+[ignore files/directories matching specified mask]:mask' \
+    '(-a -s -d)-a[display entry also for files (not just directories) in file hierarchy]' \
+    '(-a -s -d)-d+[display entry for directories up to specified depth]:depth' \
+    '(-a -s -d)-s[display entry only for files/directories specified on the command line]' \
+    '(-h -k -m -g)-h[human readable output]' \
+    '(-h -k -m -g)-k[use block size of 1K-byte]' \
+    '(-h -k -m -g)-m[use block size of 1M-byte]' \
+    '(-h -k -m -g)-g[use block size of 1G-byte]' \
+    '-c[display grand total]' \
+    '-r[notify about unreadable files/directories]' \
+    '-x[exclude directories on different file systems]' \
+    '*:file:_files'
+
 else
   # based on $OSTYPE = solaris2.8
   local xdev='[skip directories on different filesystems]'
-- 
1.7.9.6 (Apple Git-31.1)



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

* Re: [PATCH] _du: add support for Mac OS X
  2013-04-20  1:18 [PATCH] _du: add support for Mac OS X Jun T.
@ 2013-04-20  9:59 ` Frank Terbeck
  0 siblings, 0 replies; 4+ messages in thread
From: Frank Terbeck @ 2013-04-20  9:59 UTC (permalink / raw)
  To: Jun T.; +Cc: zsh-workers

Jun T. wrote:
> 2nd try

That worked! :)

Btw, "git am" takes the contents of the email as the commit message. If
you need room for comments that don't belong into the commit message
(like the "2nd try"), you can just put them between the three-dashes
line and the diff-stat as generated by "git format-patch".

I've taken the comment out and committed the whole thing. Here's the
result:

  http://sourceforge.net/p/zsh/code/ci/452aa5157a26959ed6d127d287d703e804b5e2c1/

Thanks!

Regards, Frank


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

* Re: [PATCH] _du: add support for Mac OS X
  2013-04-19 17:04 Jun T.
@ 2013-04-19 18:43 ` Frank Terbeck
  0 siblings, 0 replies; 4+ messages in thread
From: Frank Terbeck @ 2013-04-19 18:43 UTC (permalink / raw)
  To: Jun T.; +Cc: zsh-workers

Jun T. wrote:
> I'm not familiar with git yet; hope the patch is in a correct format.

It seems like your mail application mangled the patch contents. You can
always use "git send-email ..." to avoid such problems. As for the
format: It looks okay, although you would usually have a lines with
three dashes before the diff-stat.

If you use "git format-patch ..." to create the patches, they will
always be in exactly the right format to feed into "git am", which will
import some data from the email's headers into the git repo. Especially
from the "From:" header: Your name and email will be used for the
commit's author field.

Could you resend? Because due to your MUA's mangling, I get a "corrupt
patch" condition with this one.

Regards, Frank


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

* [PATCH] _du: add support for Mac OS X
@ 2013-04-19 17:04 Jun T.
  2013-04-19 18:43 ` Frank Terbeck
  0 siblings, 1 reply; 4+ messages in thread
From: Jun T. @ 2013-04-19 17:04 UTC (permalink / raw)
  To: zsh-workers

I'm not familiar with git yet; hope the patch is in a correct format.


Completion/Unix/Command/_du |   18 ++++++++++++++++++
1 file changed, 18 insertions(+)

diff --git a/Completion/Unix/Command/_du b/Completion/Unix/Command/_du
index 9974d72..9ae6e9c 100644
--- a/Completion/Unix/Command/_du
+++ b/Completion/Unix/Command/_du
@@ -47,6 +47,24 @@ if _pick_variant gnu=Free\ Soft unix --version /dummy/no-such-file; then

  return ret

+elif [[ "$OSTYPE" == darwin* ]]; then
+  _arguments -s -A "-*" \
+    '(-H -L -P)-H[follow symlinks on the command line]' \
+    '(-H -L -P)-L[follow all symlinks]' \
+    '(-H -L -P)-P[do not follow symlinks (default)]' \
+    '*-I+[ignore files/directories matching specified mask]:mask' \
+    '(-a -s -d)-a[display entry also for files (not just directories) in file hierarchy]' \
+    '(-a -s -d)-d+[display entry for directories up to specified depth]:depth' \
+    '(-a -s -d)-s[display entry only for files/directories specified on the command line]' \
+    '(-h -k -m -g)-h[human readable output]' \
+    '(-h -k -m -g)-k[use block size of 1K-byte]' \
+    '(-h -k -m -g)-m[use block size of 1M-byte]' \
+    '(-h -k -m -g)-g[use block size of 1G-byte]' \
+    '-c[display grand total]' \
+    '-r[notify about unreadable files/directories]' \
+    '-x[exclude directories on different file systems]' \
+    '*:file:_files'
+
else
  # based on $OSTYPE = solaris2.8
  local xdev='[skip directories on different filesystems]'
-- 
1.7.9.6 (Apple Git-31.1)



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

end of thread, other threads:[~2013-04-20 10:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-20  1:18 [PATCH] _du: add support for Mac OS X Jun T.
2013-04-20  9:59 ` Frank Terbeck
  -- strict thread matches above, loose matches on Subject: below --
2013-04-19 17:04 Jun T.
2013-04-19 18:43 ` Frank Terbeck

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