Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _expand_alias does not expand aliases that contain an "!"
On Aug 30, 7:58pm, Jonathan H wrote:
}
} Oddly enough, for me _expand_alias works for all characters in
} [*#?@:+-^%$.,]. the only character that didn't work and wasn't already
} meaningful to the shell was the exclamation point.
Hmm. Indeed, something is treating "!" as additionally special. The
interesting part is that it does not always treat the first character of
the $HISTCHARS variable as special, nor does it treat ! as special when
it is not the first character of $HISTCHARS.
Or (more likely) internally somewhere is explicitly un-quoting file
expansion characters but is not doing so for history characters. This
could probably be fixed but might take a while to trace down.
} I'm on Zsh 5.02, Ubuntu 14.04 x64 and Fedora Rawhide x64. One possible
} solution on my end is to define the aliases like this:
}
} Heptagon% alias 'gc!'="git commit --amend"
} Heptagon% alias 'gc\!'="git commit --amend"
Sure, that's fine as long as you never want to be able to type gc\! to
prevent the first alias from expanding. Or the patch I sent should
apply to _expand_alias in 5.0.2.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author