zsh-users
 help / color / mirror / code / Atom feed
From: Bruce Stephens <bruce+zsh@cenderis.demon.co.uk>
To: zsh-users@sunsite.auc.dk
Subject: Re: zsh tips for "UNIX Power Tools"
Date: 03 Mar 2000 23:05:42 +0000	[thread overview]
Message-ID: <87k8jjwt6h.fsf@cenderis.demon.co.uk> (raw)
In-Reply-To: Thomas=?iso-8859-1?q?_K=F6hler's?= message of "Fri, 3 Mar 2000 12:39:32 +0100"

Thomas Köhler <jean-luc@picard.franken.de> writes:

[...]

>   And this one:
>   chmod 755 **/*(/)
>   chmod 644 **/*(.)
>   Hey, all directories are mode 755, while all plain files are mode 644!
>   Again, no find is necessary, as would be for bash:
>   find . -type d -exec chmod 755 {} \;
>   find . -type f -exec chmod 644 {} \;

What's wrong with

        chmod -R go+rX .

However, wacky globbing is probably the thing that's special to zsh
that I consciously use.  OK, completion, too.

For example, a colleague was using some inferior shell (bash, I think)
and having to do things like:

        find . -type f -print | xargs grep -l ...

(It's painful to watch, sometimes.)  In zsh (for reasonably sized
trees, which I find are pretty common, YMMV): "grep -l ... **/*(.)".  

Yes, you can write little shell-scripts to do find ... | xargs, but **
(or ***) is just so much more convenient.  VMS had the right idea,
there.

Which of the directories is biggest?  "du -sk *(/)"
Which file has changed in the last couple of days? "echo *(m-2)"

And so on.  There are lots of really fancy things that zsh can do, but
I tend not to be able to remember them.  Simple stuff like the above
make it worthwhile to use, however, and the necessary syntax is very
easy to remember.



The stat dynamically loadable module is convenient for those operating
systems which don't have a stat executable.


I find these convenient:
        setopt autocd
        setopt autopushcd

I find this nice, but it's mostly cosmetic (path on the left is OK, too):
        RPROMPT="%~"


The built-in completion is excellent (that is, the scripts that are
supplied with 3.1.6-dev-18).  Peter Stephenson's guide to it shows a
number of nice tricks to changing its behaviour.

> - setopt rmstarsilent
>   (I don't like this
>    "sure you want to delete all the files in /home/jean-luc/foooooooo [yn]?"
>   )

Matter of taste.  I like it.


[...]

> - Why not simply use ^Xh instead of ^X^H? Now, I have a feature of
>   zsh-3.1.6-dev-xx on ^Xh:
>   bindkey "^Xh" _complete_help

Why not use M-h, which is built-in, I think.  I don't remember
configuring it, anyway.


[...]


  parent reply	other threads:[~2000-03-03 23:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-02 16:13 Jerry Peek
2000-03-03 11:39 ` Thomas Köhler
2000-03-03 14:17   ` Jerry Peek
2000-03-03 23:05   ` Bruce Stephens [this message]
2000-03-04  5:40     ` Bart Schaefer
2000-03-04 12:05       ` Thomas Köhler
2000-03-04 16:38         ` Bart Schaefer
2000-03-04 17:18           ` Bart Schaefer
2000-03-04 12:31       ` Bruce Stephens
2000-03-04 11:43     ` Thomas Köhler
2000-03-04 12:43       ` Bruce Stephens
2000-03-04 12:22     ` Vincent Lefevre
2000-03-04 18:12       ` Bart Schaefer
2000-03-05 23:19         ` Vincent Lefevre
2000-03-06  0:30           ` Bart Schaefer
2000-03-06 20:51           ` Thomas Köhler

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=87k8jjwt6h.fsf@cenderis.demon.co.uk \
    --to=bruce+zsh@cenderis.demon.co.uk \
    --cc=zsh-users@sunsite.auc.dk \
    /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).