Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG]Filename autocompletion using git-bare repos (--git-dir=... --work-tree=...)
- X-seq: zsh-workers 51543
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: eliasghafari <eliasghafari@xxxxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: [BUG]Filename autocompletion using git-bare repos (--git-dir=... --work-tree=...)
- Date: Thu, 9 Mar 2023 09:12:54 -0800
- Archived-at: <https://zsh.org/workers/51543>
- In-reply-to: <20230309123303.77hztdd63lvxafg4@eliaspc>
- List-id: <zsh-workers.zsh.org>
- References: <20230309123303.77hztdd63lvxafg4@eliaspc>
On Thu, Mar 9, 2023 at 4:42 AM eliasghafari <eliasghafari@xxxxxxxxxxx> 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author