On Mon, Mar 19, 2018 at 9:52 PM, Chet Ramey wrote:
> > `-o filenames' would append `/' to a word if the word is coincidentally a
> > real existing dir name. How can I ask it not to append the `/'?
>
> You can't. That's the implication from my second paragraph.
>
OK. I'll
On 3/17/18 10:49 PM, Clark Wang wrote:
> You haven't told complete that you want the words to be quoted. If you
> install the completion using the `-o filenames' option, you will get
> filename-like quoting.
>
>
> `-o filenames' would append `/' to a word if the word is
On Sun, Mar 18, 2018 at 1:18 AM, Chet Ramey wrote:
> On 3/17/18 12:16 AM, Clark Wang wrote:
> > On Sat, Mar 17, 2018 at 1:00 AM, wrote:
> >
> >>
> >> It works correctly if the single quote is itself quoted. Our test
> wordlist
> >> would then be:
On Sat, Mar 17, 2018 at 2:06 PM, Chet Ramey wrote:
> Processing the word argument to -W honors shell quoting, in order to
> provide a simple way to return words containing shell metacharacters and
> characters in $IFS. There is a sentence to this effect in the texinfo
>
On 3/17/18 12:16 AM, Clark Wang wrote:
> On Sat, Mar 17, 2018 at 1:00 AM, wrote:
>
>>
>> It works correctly if the single quote is itself quoted. Our test wordlist
>> would then be: "foo\'bar aaa bbb"
>>
>> paulo@monk:~/tmp$ compgen -W "foo\'bar aaa bbb" -- a
>> aaa
>>
On 3/16/18 1:00 PM, marcelpa...@gmail.com wrote:
> Bash Version: 4.4
> Patch Level: 12
> Release Status: release
>
> Description:
> compgen -W "wordlist" doesn't split wordlist on $IFS if wordlist contains
> unquoted single quotes. For instance, this wordlist, "foo'bar aaa bbb", won't
> be split
On Sat, Mar 17, 2018 at 7:32 PM, Paulo Marcel Coelho Aragão <
marcelpa...@gmail.com> wrote:
> > Actually every word in the -W "wordlist" needs to be sh-quoted twice
> (with
> > ``printf %q'' or the new ``${var@Q}'' syntax). It'll be a bit easier if
> you
> > use an array.
>
> On a second thought,
> Actually every word in the -W "wordlist" needs to be sh-quoted twice (with
> ``printf %q'' or the new ``${var@Q}'' syntax). It'll be a bit easier if
you
> use an array.
On a second thought, sh-quoting twice with ${var@Q} won't work as expected
in this case, since it encloses the expanded value
On Sat, Mar 17, 2018 at 12:16:24PM +0800, Clark Wang wrote:
> This seems to work but it does not. For example in the command line
>
> # some-cmd f
>
> will become
>
> # some-cmd foo'bar
>
> then you press ENTER and it'll still wait for another ' char.
Oh, I hadn't realized that, you're
On Sat, Mar 17, 2018 at 1:00 AM, wrote:
>
> It works correctly if the single quote is itself quoted. Our test wordlist
> would then be: "foo\'bar aaa bbb"
>
> paulo@monk:~/tmp$ compgen -W "foo\'bar aaa bbb" -- a
> aaa
> paulo@monk:~/tmp$ compgen -W "foo\'bar aaa bbb" -- b
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale'
11 matches
Mail list logo