Re: Bash completion produces unusable cd command for directories startin
From:
Koichi Murase
Subject:
Re: Bash completion produces unusable cd command for directories starting with '-'
Date:
Mon, 16 Nov 2026 14:06:35 +0900
2026年11月16日(月) 12:34 Diin Ferhatovic <diin.ferhatovic@gmail.com>:
> I understand that filename completion is generally command-agnostic, but it
> seems undesirable for completion to generate a command that predictably
> fails.
My first impression is that it seems overengineering for the
command-agnostic built-in filename completion. Bash provides
programmable completion exactly for this purpose. In the first place,
if it is truely command-agnostic, there is no way to tell whether "a
generated command predictably fails". For example, it is non-trivial
whether one completes "./-example" or "-example" after "<cmd> --
-ex[tab]".
> Is this considered intentional behavior, or would a patch addressing it be
> welcome?
We may accept improvements in scop/bash-completion.
--
Koichi