From: "David C. Rankin" <drankinatty@suddenlinkmail.com>
To: zsh users list <zsh-users@zsh.org>
Subject: Re: help adapting bashism for zsh
Date: Mon, 10 Jun 2019 17:31:13 -0500 [thread overview]
Message-ID: <c0918f9a-d5b6-a44b-f3da-2065da6fb9ca@suddenlinkmail.com> (raw)
In-Reply-To: <CAH+w=7YdaTdCgG-fGycQTdFHobwSNUDQWZ3v=9gQa_B26y2bHQ@mail.gmail.com>
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.
--
David C. Rankin, J.D.,P.E.
next prev parent reply other threads:[~2019-06-10 22:31 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 [this message]
2019-06-11 8:56 ` Peter Stephenson
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=c0918f9a-d5b6-a44b-f3da-2065da6fb9ca@suddenlinkmail.com \
--to=drankinatty@suddenlinkmail.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).