On Wed, Jan 11, 2017 at 11:53 PM, David Wright <
deblis@lionunicorn.co.uk> wrote:
On Wed 11 Jan 2017 at 22:38:48 (-0500), kamaraju kusumanchi wrote:
Just unalias the alias corresponding to edit (the one you set up in
~/.zshrc) before launching reportbug. After that set it back. IIUC
there is no need to launch a bash subshell to do this. You can do
everything while you are in zsh.
So the sequence of commands would be
% unalias edit
% reportbug &
% alias edit='emacsclient -c -s /tmp/emacs1000/server'
If you're going to do it that way, you've really got to
interrogate the old value and restore it afterwards, rather
than having edit defined in two places. Otherwise, how do
you keep them in sync.
Most people wouldn't run reportbug often enough to worry
about a subshell, would they?
There are always multiple ways to solve a problem often with different
advantages/disadvantages. I do not have a problem with subshell per
se. My point is that the previously proposed solution requires OP to
start a different shell (i.e. zsh users starting bash). What is to
assume that there is no such alias defined in ~/.bashrc?