git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] parse-options: expand $HOME on filename options

From
Duy Nguyen <pclouds@gmail.com>
Date
Feb 23, 2018, 10:11 UTC
Message-ID
<CACsJy8BqWVh0VY5Ydqez_Kqc-UwWk7YRuJWCUpYhkBU80rKe7w@mail.gmail.com>
In-Reply-To
<87606pf8kg.fsf@evledraar.gmail.com>

On Thu, Feb 22, 2018 at 8:38 PM, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:

Show 18 quoted lines
> Ah I see, so you're doing "git init --template=~/<TAB>".
>
> ...
>
> I wonder if the consistency with the tab completion wouldn't be better
> done by teaching the tab completion to just expand --template=~/<TAB> to
> e.g. --template=/home/duy/.
>
> On my (Debian) system doing e.g.:
>
>     echo $HOME/bin/<TAB>
>
> Will expand to:
>
>     echo /home/avar/bin/
>
> Maybe we could intercept that in the completion and ~ to the value of
> $HOME.

Yeah that's what I had in mind (though I still have no idea if it's hard to do). Let's drop this series then. I'll keep this <TAB> thing in my backlog and hopefully will fix it soon. I'll have to read git-completion.bash carefully for another series anyway. And I have a feeling that "git --completion-helper" needs to tell git-completion.bash "this argument takes a path" before we start to expand stuff.

-- 
Duy
Previous: Ævar Arnfjörð Bjarmason
Message 11 of 11 in “[BUG] git init doesn't respect `--template` like configuration variable init.templateDir and $GIT_TEMPLATE_DIR”
  1. Doron BeharFeb 14, 2018
  2. 1/2 parse-options: expand $HOME on filename optionsNguyễn Thái Ngọc Duy, Feb 14, 2018
  3. 2/2 init-db: change --template type to OPTION_FILENAMENguyễn Thái Ngọc Duy, Feb 14, 2018
  4. Jeff KingFeb 14, 2018
  5. Jeff KingFeb 14, 2018
  6. Junio C HamanoFeb 14, 2018
  7. Ævar Arnfjörð BjarmasonFeb 14, 2018
  8. Junio C HamanoFeb 15, 2018
  9. Duy NguyenFeb 22, 2018
  10. Ævar Arnfjörð BjarmasonFeb 22, 2018
  11. Duy NguyenFeb 23, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.