Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: sourcing a sh file in zsh
- X-seq: zsh-workers 26419
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: sourcing a sh file in zsh
- Date: Sat, 24 Jan 2009 15:11:13 -0800
- In-reply-to: <200901241859.30029.arvidjaar@xxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <BD9D2405-AD6A-4336-9C8A-85149165B6B8@xxxxxxxxx> <200901161939.54651.arvidjaar@xxxxxxxxxx> <090116102934.ZM22119@xxxxxxxxxxxxxxxxxxxxxx> <200901241859.30029.arvidjaar@xxxxxxxxx>
On Jan 24, 6:59pm, Andrey Borzenkov wrote:
}
} > emulate -LRE sh source file.sh
}
} What about the following patch. It simply eval's any code after setting
} requested emulation. As a bonus it prints current emulation if no argument
} is specified.
This looks a lot like what I had in mind, yes.
} Neither should be of compatibility issues as emulate always
} allowed exactly one argument.
Agree.
} Comments?
I'm still undecided on (1) whether "-E" should either require or always
imply -L, and (2) whether I like "-c" better, as in
emulate sh -c 'source file.sh'
As to (1), in what circumstances would you want to eval a command
under emulation and then leave the emulation in place? If you were
going to leave emulation turned on anyway, why wouldn't you write
it as
emulate sh
source file.sh
??
(2) is a nit. Mainly it affects whether emulate accepts only one argument
to be eval'd.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author