zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Tim Eliseo <tre-zsh@crushedhat.com>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH] Add option like tcsh's dextract
Date: Tue, 18 Jul 2023 17:17:12 +0200	[thread overview]
Message-ID: <CAHYJk3SCH1BTjjx8yivtWdykSDrvFUbNivnM1rEnfz+CC_-R_A@mail.gmail.com> (raw)
In-Reply-To: <3a8e90b4-def1-bada-c118-68ddc1245972@crushedhat.com>

On 7/18/23, Tim Eliseo <tre-zsh@crushedhat.com> wrote:
> Hi all!
>
> This is my first post to the group. I’d been using tcsh as an
> interactive shell since way back when it was still cool, before zsh or
> bash even existed. Zsh is the first shell that’s a worthy successor. One
> of the small things that kept me from jumping to bash (along with
> everyone else in the Linux world) is that it doesn’t have a proper
> implementation of asynchronous notify of job completion (-b), which zsh
> does. Another thing that bugged me about bash was that there is no clean
> way to emulate tcsh’s dextract option, which rearranges the pushd stack
> differently. I eventually discovered that zsh can do the basic function
> through the cd/chdir builtin with the auto_pushd option set, but coding
> a pushd replacement function was complicated to get right for all option
> cases (see attached).

Based on my own experiments and the hunk in the patch, it seems that
the same thing can be accomplished with setopt auto_pushd and using cd
instead of pushd? I'm not sure if it is documented that using cd
instead of pushd with auto_pushd set will not roll the list; in fact i
was not aware that the list would be rolled with pushd because i have
always been too lazy to type it instead of cd :).

> However, I found that adding this pushd mode to zsh natively was trivial
> (simply testing for the new option in one place), and I’m still baffled
> why it wasn’t included a long time ago while someone was looking for
> ways to increase compatibility with other shells. The attached patch
> (based on the current master branch) does just that, and I hope you see
> fit to merge it into the codebase. I believe I’ve done all the
> appropriate option handling, documentation, and unit test to make this
> painless. I didn’t write a ChangeLog entry since I wasn’t sure of the
> appropriate format, or how to derive the number. (Is that an SVN
> revision number?)

The number is the sequence id assigned to your mail by the mailing
list software (X-Seq: 51958) so it would have been quite difficult to
know in advance. Conventionally the changelog entry is created by the
committer of the patch.

-- 
Mikael Magnusson


  reply	other threads:[~2023-07-18 15:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-18  9:54 Tim Eliseo
2023-07-18 15:17 ` Mikael Magnusson [this message]
2023-08-04 16:47 ` Tim Eliseo
2023-08-04 16:58   ` Mikael Magnusson
     [not found]     ` <ee258794-761e-8f48-01d2-f0db6d8b6dc7@crushedhat.com>
2023-08-04 18:08       ` Mikael Magnusson
2023-08-05 23:48   ` Bart Schaefer
2023-08-08 22:13     ` Tim Eliseo
2023-08-09  8:50       ` Peter Stephenson
2023-08-09 13:16       ` Mikael Magnusson
2023-08-09 14:19         ` Tim Eliseo
2023-08-09 16:24           ` Mikael Magnusson
2023-08-09 17:25             ` Bart Schaefer
2023-08-09 23:27               ` Tim Eliseo
2023-08-12  3:42                 ` Bart Schaefer
2023-08-09 22:49             ` Tim Eliseo

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=CAHYJk3SCH1BTjjx8yivtWdykSDrvFUbNivnM1rEnfz+CC_-R_A@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=tre-zsh@crushedhat.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).