Re: Completion with -W fails if words contain ':'

2024-12-04 Thread Martin D Kealey
On Wed, 4 Dec 2024 at 14:48, Keith Thompson wrote: > On Tue, Dec 3, 2024 at 10:20 AM Chet Ramey wrote: > > An easier workaround might have been removing `:' from COMP_WORDBREAKS. > > Sure, but that would affect all completions. I only want to change how > completions > work for my one custom com

Re: Completion with -W fails if words contain ':'

2024-12-04 Thread Chet Ramey
On 12/3/24 11:48 PM, Keith Thompson wrote: An easier workaround might have been removing `:' from COMP_WORDBREAKS. Sure, but that would affect all completions. I only want to change how completions work for my one custom command. Sure. You have to determine how many commands you're completin

Re: Completion with -W fails if words contain ':'

2024-12-03 Thread Keith Thompson
On Tue, Dec 3, 2024 at 10:20 AM Chet Ramey wrote: > > On 12/2/24 7:29 PM, Keith Thompson wrote: > > OK, that explains the problem, and I have a workaround. > > > > (Background: I have a personal tool that uses "foo:bar" syntax for > > some of its arguments. I've modified the tool to use "foo/bar >

Re: Completion with -W fails if words contain ':'

2024-12-03 Thread Chet Ramey
On 12/2/24 7:29 PM, Keith Thompson wrote: OK, that explains the problem, and I have a workaround. (Background: I have a personal tool that uses "foo:bar" syntax for some of its arguments. I've modified the tool to use "foo/bar instead.) An easier workaround might have been removing `:' from CO

Re: Completion with -W fails if words contain ':'

2024-12-02 Thread Keith Thompson
OK, that explains the problem, and I have a workaround. (Background: I have a personal tool that uses "foo:bar" syntax for some of its arguments. I've modified the tool to use "foo/bar instead.) Escaping the colons with backslashes doesn't seem to work: $ echo $BASH_VERSION 5.2.32(1)-release $ e

Re: Completion with -W fails if words contain ':'

2024-12-02 Thread Chet Ramey
On 12/2/24 12:52 AM, Keith Thompson wrote: Bash Version: 5.2 Patch Level: 32 Release Status: release Description: If the wordlist given to `complete -W` includes words containing the ':' character, completion misbehaves. The problem seems to occur if two or more words in the wordlist

Re: Completion with -W fails if words contain ':'

2024-12-02 Thread Andreas Schwab
What is your value of COMP_WORDBREAKS? -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Completion with -W fails if words contain ':'

2024-12-01 Thread Keith Thompson
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -Werror=implicit-function-declaration -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-p