Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
rm nonexisting*; alias with parameters?
- X-seq: zsh-users 9282
- From: Deliverable Mail <deliverable@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: rm nonexisting*; alias with parameters?
- Date: Wed, 10 Aug 2005 12:18:53 -0700
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=XiLNdxrhGImdveYVc8VflgjEdeaGOzFdvkd3rVFs0SlGqsA3ccRuXanwQhzzBwRlrsN0WvtgARYcJaB3x/VNAv5PHq8Jb+JIyEXS9NcsuYmuyXo6J+fOD+J/QmhsRYbBloKB7i2o5Dqp/W18/F9N7DbvjcyvauT0gUv3n/zUx4o=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
I have a log directory where different logs appear, and an alias to
clear it up. I try to define patterns covering all the logs to avoid
rm *, which is dangerous and asks for a confirmation. So I define all
possible patterns like in an alias, rml:
alias rml='rm prefix1.* *.suffix2*'
But when some of the patterns match nothing, zsh prints an error about
that doesn't do anything. How can I change that behavior to the
expected of rm -f ?
While I'm on the subject of aliases, looks like zsh aliases are as
weak as bash's, so when I have my lr:
alias lr='ls -lt | head'
which I could not use with a parameter, lr <dir>, I still cannot use a
parameter in zsh. In bash, made lr a function -- what the zsh
function would look like? And is there a way to do it in an alias, or
still not?
Alexy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author