[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-readline] How does readline know where words end (psql and yank
From: |
Alexander Shulgin |
Subject: |
Re: [Bug-readline] How does readline know where words end (psql and yank-last-arg use case)? |
Date: |
Wed, 6 Jul 2011 15:33:57 +0300 |
On Wed, Jul 6, 2011 at 14:40, Chet Ramey <address@hidden> wrote:
>> I'm just wondering how does readline know where any given word ends
>> and another one starts?
>
> In this case, since you're yanking from the history, it uses the history
> library's set of word delimiters. In general, it uses the notion of
> characters that break words.
>
> The history library's set of word delimiters is a subset of the shell's:
> ` \t\n;&()|<>', with quoting honored.
>
> There aren't any hooks to modify this from outside the history library.
OK, I see this line in histexpand.c:
51: #define HISTORY_WORD_DELIMITERS " \t\n;&()|<>"
Any reason (e.g. security) we couldn't patch it to get this from an
environment variable?
--
Alex