zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: eliasghafari <eliasghafari@disroot.org>
Cc: zsh-workers@zsh.org
Subject: Re: [BUG]Filename autocompletion using git-bare repos (--git-dir=... --work-tree=...)
Date: Thu, 9 Mar 2023 09:12:54 -0800	[thread overview]
Message-ID: <CAH+w=7YibCATCz-YFFuB=80Eim1MQCuo8NZVeHeYtFu6SwyyAA@mail.gmail.com> (raw)
In-Reply-To: <20230309123303.77hztdd63lvxafg4@eliaspc>

On Thu, Mar 9, 2023 at 4:42 AM eliasghafari <eliasghafari@disroot.org> wrote:
>
> I'm using a git bare repo to manage my files with this alias: "alias config='git --git-dir=$HOME/.local/share/dotfiles --work-tree=$HOME'",
> [...]
> (( $+opt_args[--git-dir] )) && local -x GIT_DIR=${(Q)${~opt_args[--git-dir]}} && printf("\n${(Q)${~opt_args[--git-dir]}}\n")
> which shows that the address passed to GIT_DIR is "$HOME/.local/share/dotfiles" without the "$HOME" being expanded to "/home/user".
>
> I fixed this by replacing the Q modifier with e

The Q modifier is just cleaning up quotes, so you probably don't want
to remove that.  I think the right thing would be to change
${(Q)${~opt_args[--git-dir]}} to ${(Q)${(e)~opt_args[--git-dir]}} but
I would defer to Daniel or Oliver to confirm.


  reply	other threads:[~2023-03-09 17:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09 12:33 eliasghafari
2023-03-09 17:12 ` Bart Schaefer [this message]
2023-03-09 19:27 ` Oliver Kiddle
2023-03-09 23:54   ` The (e) parameter flag and side-effects Bart Schaefer
2023-03-10 10:07   ` [BUG]Filename autocompletion using git-bare repos (--git-dir=... --work-tree=...) Elias Ghafari
2023-03-10 10:12     ` Roman Perepelitsa
2023-09-11 15:05       ` Elias Ghafari
2023-09-12  2:26         ` Jun T
2023-09-12  8:54 eliasghafari
2023-09-12  9:34 ` Roman Perepelitsa
2023-09-12 19:25   ` eliasghafari
2023-09-12 19:33     ` 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='CAH+w=7YibCATCz-YFFuB=80Eim1MQCuo8NZVeHeYtFu6SwyyAA@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=eliasghafari@disroot.org \
    --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).