zsh-workers
 help / color / mirror / code / Atom feed
From: Richard Coleman <coleman@math.gatech.edu>
To: zsh-workers@math.gatech.edu
Subject: Re: rmstar option nit in 2.6-beta11
Date: Fri, 10 Nov 1995 18:45:03 -0500	[thread overview]
Message-ID: <199511102345.SAA00693@redwood.skiles.gatech.edu> (raw)
In-Reply-To: Your message of "Fri, 10 Nov 1995 16:05:20 MST." <9511102305.AA06309@suomi.cdc.noaa.gov>

> I'm one of the fools who aliases rm to 'rm -i' and who has zsh prompt
> on *. (I know the argument that I'll be burned when I do an rm * on
> another system and expect to be protected. But until then I'll just
> attend `rm -i anonymous meetings' ;-)

REAL men alias `rm' to `rm -f'   :-)

> Anyway, should zsh behave this way under these circumstances:
> 
> 	$ rm *
> 	zsh: sure you want to delete all the files in /foo/bar? n
> 	rm: too few arguments
> 	Try `rm --help' for more information.
> 
> (this is gnu rm, obviously)
> 
> I'd thought the command itself would be aborted, but instead it
> appears to just clean out the arg list for the command. Is this the
> intended behaviour?

Interesting.  Looking at the code, I see that if you do

   $ rm *

and then type `n' when it queries you, it will abort the command with
a return value of 1.  If you type

   $ rm file1 *

and then type `n' when it queries you, it will delete `*' from the argument
list and continue.  Therefore file1 gets deleted and it returns with a
return value of 0.

Not very consistent.  I agree that in this case it's probably better to
just abort the command.  I'll need to check this more carefully, but it
appears you can just replace the lines

uremnode(args, node)'

in that particular piece of code (it's hard for me to give you line numbers
since I've made changes to exec.c) with the lines

lastval = 1;
return;

and then remove the lines

if (!nextnode(firstnode(args)))
    errflag = 1;

I'll look at this some more and try to fix it for beta12.

rc




  reply	other threads:[~1995-11-11  0:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-11-10 23:05 Mark Borges
1995-11-10 23:45 ` Richard Coleman [this message]
1995-11-11  0:12   ` Barton E. Schaefer

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=199511102345.SAA00693@redwood.skiles.gatech.edu \
    --to=coleman@math.gatech.edu \
    --cc=zsh-workers@math.gatech.edu \
    /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).