zsh-workers
 help / color / mirror / code / Atom feed
From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: Elias Ghafari <eliasghafari@disroot.org>
Cc: Oliver Kiddle <opk@zsh.org>, zsh-workers@zsh.org
Subject: Re: [BUG]Filename autocompletion using git-bare repos (--git-dir=... --work-tree=...)
Date: Fri, 10 Mar 2023 11:12:12 +0100	[thread overview]
Message-ID: <CAN=4vMoqiFcB_dXZZ9SzX826SC6bT+p5SMdjbva=ah5bGSq-xQ@mail.gmail.com> (raw)
In-Reply-To: <20230310100757.zene4lp55wvduvz4@eliaspc>

On Fri, Mar 10, 2023 at 11:08 AM Elias Ghafari <eliasghafari@disroot.org> wrote:
>
> On 23/03/09 08:27PM, Oliver Kiddle wrote:
> >
> > I would suggest you try using ~ instead of $HOME in your alias:
> >
> >   alias config='git --git-dir=~/.local/share/dotfiles --work-tree=~'
> >
> > The tilde in ${~opt_args[--git-dir]}} ensures that tildes are expanded.
>
> I have actually tried that before and i noticed that the completion
> works as if i had put the (e), but the problem is, while the completion
> works the command itself doesn't and returns an error saying that
> '~/.local/share/dotfiles` isn't a git repo:
> fatal: not a git repository: '~/.local/share/dotfiles'

You can either replace `--work-tree=~` with `--work-tree ~` or set
magic_equal_subst. I'd do the former.

Roman.


  reply	other threads:[~2023-03-10 10:12 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
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 [this message]
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='CAN=4vMoqiFcB_dXZZ9SzX826SC6bT+p5SMdjbva=ah5bGSq-xQ@mail.gmail.com' \
    --to=roman.perepelitsa@gmail.com \
    --cc=eliasghafari@disroot.org \
    --cc=opk@zsh.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).