From: Peter Stephenson <p.stephenson@samsung.com>
To: <zsh-users@zsh.org>
Subject: Re: help adapting bashism for zsh
Date: Tue, 11 Jun 2019 09:56:44 +0100 [thread overview]
Message-ID: <1560243404.7122.4.camel@samsung.com> (raw)
In-Reply-To: <c0918f9a-d5b6-a44b-f3da-2065da6fb9ca@suddenlinkmail.com>
On Mon, 2019-06-10 at 17:31 -0500, David C. Rankin wrote:
> On 06/10/2019 03:22 PM, Bart Schaefer wrote:
> > This compatibility mode differs from setting individual options such
> > as KSH_ARRAYS, but can be fairly closely duplicated by using the
> > "emulate" command. If the scripts are intended to become the bodies
> > of shell functions, try adding "emulate -L sh" at the top.
>
> > > Then what to do about the non-existing expansions such
> > > as ${foo^^} (uppercase) and ${foo,,} (lowercase), etc..
> > These are handled with (in those specific examples) ${foo:u} and
> > ${foo:l}. In fact ^^ has a completely different meaning in zsh, so
> > you will have to do a search-and-replace for those kinds of
> > nonstandard tricks.
> Thank you Bart,
>
> That seems like the logical path forward. I was sure hoping somebody already
> had a handy-dandy parse & convert routine, but it looks like a normal convert
> as you go. As I go through them I'll try and keep a list of the most common
> bash/zsh conversions and notes of those cases where there is no 1-for-1
> replacement. It will be an as-time-permits endeavour, but maybe we can catch
> most issues.
The FAQ, section 2.1, should help, from the Etc directory of the
distribution or http://zsh.sourceforge.net/FAQ/zshfaq02.html#l10
pws
prev parent reply other threads:[~2019-06-11 8:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-10 0:33 David C. Rankin
2019-06-10 5:41 ` Roman Perepelitsa
2019-06-10 14:43 ` David C. Rankin
2019-06-10 14:53 ` Roman Perepelitsa
2019-06-10 17:34 ` Ray Andrews
2019-06-10 21:55 ` David C. Rankin
2019-06-10 20:22 ` Bart Schaefer
2019-06-10 22:31 ` David C. Rankin
2019-06-11 8:56 ` Peter Stephenson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1560243404.7122.4.camel@samsung.com \
--to=p.stephenson@samsung.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).