* Creating short time aliases
@ 2006-09-03 21:30 Jens Kubieziel
2006-09-03 22:04 ` Frank Terbeck
2006-09-03 22:36 ` Wayne Davison
0 siblings, 2 replies; 5+ messages in thread
From: Jens Kubieziel @ 2006-09-03 21:30 UTC (permalink / raw)
To: zsh-users
Hi,
within bash I can use some pseudo-aliases:
$ a really long command name # myalias
$ Ctrl+R myalias
The last command expands to 'a really long command name'. When I try
this in zsh; i get an error "bad pattern: #". What would be a good
zsh'ish way to get a similar result?
Thanks for your recommendations
--
Jens Kubieziel http://www.kubieziel.de
FdI#430: Heterogene Umgebung
Debian und Linux 9.1 (Bodo Eggert)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Creating short time aliases
2006-09-03 21:30 Creating short time aliases Jens Kubieziel
@ 2006-09-03 22:04 ` Frank Terbeck
2006-09-03 22:36 ` Wayne Davison
1 sibling, 0 replies; 5+ messages in thread
From: Frank Terbeck @ 2006-09-03 22:04 UTC (permalink / raw)
To: zsh-users
Jens Kubieziel <maillist@kubieziel.de>:
> within bash I can use some pseudo-aliases:
> $ a really long command name # myalias
> $ Ctrl+R myalias
> The last command expands to 'a really long command name'. When I try
> this in zsh; i get an error "bad pattern: #". What would be a good
> zsh'ish way to get a similar result?
>
> Thanks for your recommendations
[snip]
% zsh -f
% echo this is one hell of a long command line. # myalias
this is one hell of a long command line. # myalias
% setopt extendedglob
% echo this is one hell of a long command line. # myalias
zsh: bad pattern: #
% setopt interactivecomments
% echo this is one hell of a long command line. # myalias
this is one hell of a long command line.
[snap]
Regards, Frank
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Creating short time aliases
2006-09-03 21:30 Creating short time aliases Jens Kubieziel
2006-09-03 22:04 ` Frank Terbeck
@ 2006-09-03 22:36 ` Wayne Davison
2006-09-04 15:23 ` zzapper
1 sibling, 1 reply; 5+ messages in thread
From: Wayne Davison @ 2006-09-03 22:36 UTC (permalink / raw)
To: zsh-users
On Sun, Sep 03, 2006 at 11:30:21PM +0200, Jens Kubieziel wrote:
> $ a really long command name # myalias
In addition to Frank's suggestion to turn on the interactivecomments
option in zsh, you could instead choose to use a different comment idiom
(which works in both shells all the time):
$ a really long command name ;: myalias
It's a little harder to type, though, so you may just prefer to stick
with # .
..wayne..
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Creating short time aliases
2006-09-03 22:36 ` Wayne Davison
@ 2006-09-04 15:23 ` zzapper
2006-09-04 17:54 ` Bart Schaefer
0 siblings, 1 reply; 5+ messages in thread
From: zzapper @ 2006-09-04 15:23 UTC (permalink / raw)
To: zsh-users
Wayne Davison <wayned@users.sourceforge.net> wrote in
news:20060903223624.GB25165@blorf.net:
pseudo-aliases:-
Sorry what's this all about?
Real example please
--
http://successtheory.com/tips/ Vim, Zsh, MySQL Tips
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Creating short time aliases
2006-09-04 15:23 ` zzapper
@ 2006-09-04 17:54 ` Bart Schaefer
0 siblings, 0 replies; 5+ messages in thread
From: Bart Schaefer @ 2006-09-04 17:54 UTC (permalink / raw)
To: zsh-users
On Sep 4, 3:23pm, zzapper wrote:
}
} Sorry what's this all about?
As I understand it, he wants to be able to stick a tag on the end of
a command when he types it, so that he can later use that tag in a
history search to quickly find the same command again.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-09-04 17:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-03 21:30 Creating short time aliases Jens Kubieziel
2006-09-03 22:04 ` Frank Terbeck
2006-09-03 22:36 ` Wayne Davison
2006-09-04 15:23 ` zzapper
2006-09-04 17:54 ` Bart Schaefer
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).