zsh-workers
 help / color / mirror / code / Atom feed
From: Julian Prein <druckdev@protonmail.com>
To: Roman Perepelitsa <roman.perepelitsa@gmail.com>
Cc: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: [PATCH] cd: Append 2nd argument to CWD if 1st is empty
Date: Fri, 01 Dec 2023 13:32:49 +0000	[thread overview]
Message-ID: <3uINOrbo4IXmuxTPyOMY6U_gv4-qULOThBv5Hd01KcO76FK9AvEFOOIo02fy5VQBIrudqP7rz__wEo1FOG2X2cMLkJzV1wp-1fYkCKYID_8=@protonmail.com> (raw)
In-Reply-To: <CAN=4vMrnmJuZ75bgcT94tah8cUDEG6V2fZh=U_u50wdG=TsPxg@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 949 bytes --]

On Friday, December 1st, 2023 at 10:21, Roman Perepelitsa <roman.perepelitsa@gmail.com> wrote:
>
> What is the use case of the new behavior?

I often work in directories that are named the same with one having an extra
suffix. Examples would be ./dotfiles and ./dotfiles-private, or ./repo and
./repo-branchname where repo-branchname is a linked git-worktree of repo to work
in different branches simultaneously.
To switch from repo-branchname to repo, I can type `cd -branchname ''`. The
inverse does currently not work though; I'd have to type
`cd ../repo-branchname`.

My motivation to submit this patch was primarily the assumption that specifying
an empty argument is an edge case that is not well defined in the documentation
and that the current behaviour is limited in its use cases. To me an appendix
seems more flexible in the ways a user can utilize this. But this might very
well be biased by my usage.

Thanks,
Julian

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

  reply	other threads:[~2023-12-01 13:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-01  3:11 Julian Prein
2023-12-01  9:21 ` Roman Perepelitsa
2023-12-01 13:32   ` Julian Prein [this message]
2023-12-01 13:51     ` Mikael Magnusson
2023-12-01 15:05       ` Julian Prein
2023-12-01 18:21     ` Lawrence Velázquez
2023-12-01 18:27       ` Roman Perepelitsa

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='3uINOrbo4IXmuxTPyOMY6U_gv4-qULOThBv5Hd01KcO76FK9AvEFOOIo02fy5VQBIrudqP7rz__wEo1FOG2X2cMLkJzV1wp-1fYkCKYID_8=@protonmail.com' \
    --to=druckdev@protonmail.com \
    --cc=roman.perepelitsa@gmail.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).