[TxMt] Re: zsh instead of bash
Allan Odgaard
mailinglist at textmate.org
Fri Jul 30 07:03:57 UTC 2010
On 29 Jul 2010, at 22:05, Iain Barnett wrote:
> [...] This works with zsh (in the terminal) because I've set the
> option RC_QUOTE so the double quote within the quotes will become a
> single one.
Using zsh as interpreter for scripts does not source the same files as
when used as an interactive shell — it is also a bad idea to make
commands rely on certain options being set (not portable or robust
against system upgrades etc.).
This command works:
#!/bin/zsh
setopt RC_QUOTES
perl -p -e 's/’/''/g;'
> [...] I could've written it straight into perl I suppose, but since
> the command line options write half the code for me that feels like
> a poor substitute.
This is the perl version:
#!/usr/bin/perl -p
s/’/'/g;
> Is there no way to make zsh the default?
As said, you can set it via the shebang :)
More information about the textmate
mailing list