Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14958 > unrolled thread
| Started by | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| First post | 2018-12-26 12:02 -0500 |
| Last post | 2018-12-26 12:02 -0500 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.bash.bug
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: readline fails to understand options. Chet Ramey <chet.ramey@case.edu> - 2018-12-26 12:02 -0500
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Date | 2018-12-26 12:02 -0500 |
| Subject | Re: readline fails to understand options. |
| Message-ID | <mailman.6318.1545843787.1284.bug-bash@gnu.org> |
On 12/21/18 12:52 AM, Bize Ma wrote: > This works: > > $ bind 'set enable-bracketed-paste on'; bind -v | grep 'bracketed' > set enable-bracketed-paste on > > However, almost any variation of the parameter "on" is not understood by > readline: > > $ bind 'set enable-bracketed-paste on .'; bind -v | grep 'bracketed' > set enable-bracketed-paste off > > $ bind 'set enable-bracketed-paste "on"'; bind -v | grep 'bracketed' > set enable-bracketed-paste off > > Without any error or warning !! It strips trailing whitespace but not much else. > It appears to fall to default value, while this: > > $ bind 'set bell-style on' ; bind -v | grep 'bell-style' > set bell-style audible > > $ bind 'set bell-style onf' ; bind -v | grep 'bell-style' > set bell-style audible > > Stays at its last value. The difference is that the readline parser treats anything other than "on" or "1" as false/off/0 when it sets boolean variables. > It seems that the parser for this options is unable to process anything > after a valid parameter. And it doesn't emit an error or warning either. Yes, the readline `bind' parser has traditionally been very permissive in some ways, strict in others. There are more warnings than before, but still relatively few. > Since the parser needs some improvement: Could it be possible to add the > capability to detect a `#` after the options as a comment ? Sure, it's a candidate for inclusion in a future version. I wouldn't object if someone wanted to do a sample implementation, since it changes how the variable value is parsed. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
Back to top | Article view | gnu.bash.bug
csiph-web