zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: <zsh-workers@zsh.org>
Subject: Re: [PATCH] POSIX_CD: disable stack entries
Date: Thu, 12 Dec 2019 10:50:17 +0000	[thread overview]
Message-ID: <1576147817.8441.7.camel@samsung.com> (raw)
In-Reply-To: <66aa7d70-03bb-3519-38e8-1ccb00c3f04f@inlv.org>

On Thu, 2019-12-12 at 11:38 +0100, Martijn Dekker wrote:
> Recognising directory stack entries for the 'cd' builtin is not 
> compatible with POSIX, because cd'ing into directories with names like 
> +123 or -4567 no longer works without prefixing './', even after '--'. 
> In POSIX, only the '-' operand has such a special meaning. The attached 
> patch disables directory stack entries for 'cd' if POSIX_CD is active.
> 
> This patch also changes the behaviour of the 'chdir' equivalent. For 
> POSIX compliance, only 'cd' needs to be changed, as POSIX has no 
> 'chdir'. I could change the patch to only change 'cd', but it would 
> involve slightly more code, and would make 'cd' and 'chdir' no longer 
> exactly equivalent. If this is preferred, please let me know.

Thanks, that sounds perfectly reasonable and I've committed it.

The intention of the POSIX options is entirely in accord with your
own --- make this clean and simple, with minimal confusion
with the clever stuff the shell does the rest of the time.

pws


      reply	other threads:[~2019-12-12 10:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20191212103905eucas1p2c9c79ee9488ab73b48db0de1ac11faf7@eucas1p2.samsung.com>
2019-12-12 10:38 ` Martijn Dekker
2019-12-12 10:50   ` 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=1576147817.8441.7.camel@samsung.com \
    --to=p.stephenson@samsung.com \
    --cc=zsh-workers@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).