Re: Bash-5.1-rc1 available
Chet Ramey wrote: > Tomas Janousek wrote: > > Chet Ramey wrote: > >> Yes, you can disable bracketed paste mode. I'll make sure that turning off > >> bracketed paste mode disables the active region for incremental searches. > > > > Would you please consider making this configurable separately? I'd love to > > keep bracketed paste mode enabled, but I find the highlighting annoying > > (and a > > bit buggy, more on that later). It seems I'm not alone: > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=972344 I would also much prefer if the highlight was separate. > I'm going to see what the reaction is with bash-5.1 and go from there. The > entire rationale for including this feature was to highlight the text a > bracketed paste inserts. Since there was no separate use, and the > contributed patch didn't include a configuration option, I didn't add one. Highlighting the region is a completely separate concept from bracketed paste mode as the region is used in many completely unrelated places. It pains me that they are coupled. Bob
Re: Bash-5.1-rc1 available
On 11/2/20 10:12 AM, Tomas Janousek wrote: > Hi Chet, > > On Mon, Oct 26, 2020 at 10:12:59AM -0400, Chet Ramey wrote: >> Yes, you can disable bracketed paste mode. I'll make sure that turning off >> bracketed paste mode disables the active region for incremental searches. > > Would you please consider making this configurable separately? I'd love to > keep bracketed paste mode enabled, but I find the highlighting annoying (and a > bit buggy, more on that later). It seems I'm not alone: > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=972344 I'm going to see what the reaction is with bash-5.1 and go from there. The entire rationale for including this feature was to highlight the text a bracketed paste inserts. Since there was no separate use, and the contributed patch didn't include a configuration option, I didn't add one. > > Also, the changelog says "when enabled", but there's currently no way to > disable it: You mean there is no separate way to disable it, which is true. > >> f. New active mark and face feature: when enabled, it will highlight the text >>inserted by a bracketed paste (the `active region') and the text found by >>incremental and non-incremental history searches. > > Now for the "bit buggy" part: > > 1. PS1='$ ' > 2. echo -n x > 3. paste something > 4. press left arrow > > Now the terminal shows "x$somethingg" instead of "x$ something". If Readline doesn't start in column 0, all bets are off. The redisplay needs to know where the physical cursor is in order to make decisions about how and where to overwrite characters. If it doesn't know there is a character in the last column, it's not going to try to overwrite it. If it doesn't have to rewrite the prompt, it's not going to: it will simply move the cursor to the physical location at the end of the prompt string and output the line. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/
Re: Bash-5.1-rc1 available
Hi Chet, On Mon, Oct 26, 2020 at 10:12:59AM -0400, Chet Ramey wrote: > Yes, you can disable bracketed paste mode. I'll make sure that turning off > bracketed paste mode disables the active region for incremental searches. Would you please consider making this configurable separately? I'd love to keep bracketed paste mode enabled, but I find the highlighting annoying (and a bit buggy, more on that later). It seems I'm not alone: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=972344 Also, the changelog says "when enabled", but there's currently no way to disable it: > f. New active mark and face feature: when enabled, it will highlight the text >inserted by a bracketed paste (the `active region') and the text found by >incremental and non-incremental history searches. Now for the "bit buggy" part: 1. PS1='$ ' 2. echo -n x 3. paste something 4. press left arrow Now the terminal shows "x$somethingg" instead of "x$ something". (Yeah, I can work around this by having PROMPT_COMMAND detect that current column is not 0 and output an additional newline, but I'd really prefer to just disable the highlighting as I don't like it.) Thanks for considering it! Regards, -- Tomáš Janoušek, a.k.a. Pivník, a.k.a. Liskni_si, https://work.lisk.in/
Re: Bash-5.1-rc1 available
On 10/20/20 4:44 PM, Bob Proulx wrote: > Chet Ramey wrote: >> This release fixes several outstanding bugs in bash-5.0 and introduces >> several new features. > > An unlisted change (I couldn't locate it in the changes) is that > 'reverse-search-history (C-r)' now highlights the search pattern. You quoted it in your message: f. New active mark and face feature: when enabled, it will highlight the text inserted by a bracketed paste (the `active region') and the text found by incremental and non-incremental history searches. > Is > that because it is the search pattern or because it now sets the region? Because it sets the region, and when bracketed paste mode is enabled, the new active region feature is enabled. > I find the reverse video highlight to be very difficult to read. For > me it is extreme eye strain. Is there a way to disable the reverse > video? For both the paste text and the search text? Yes, you can disable bracketed paste mode. I'll make sure that turning off bracketed paste mode disables the active region for incremental searches. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/
Re: Bash-5.1-rc1 available
On 2020-10-20 13:44, Bob Proulx wrote: Chet Ramey wrote: This release fixes several outstanding bugs in bash-5.0 and introduces several new features. An unlisted change (I couldn't locate it in the changes) is that 'reverse-search-history (C-r)' now highlights the search pattern. Is that because it is the search pattern or because it now sets the region? 'reverse-search-history (C-r)' Search backward starting at the current line and moving 'up' through the history as necessary. This is an incremental search. This command sets the region to the matched text and activates the mark. f. New active mark and face feature: when enabled, it will highlight the text inserted by a bracketed paste (the `active region') and the text found by incremental and non-incremental history searches. I find the reverse video highlight to be very difficult to read. For me it is extreme eye strain. Is there a way to disable the reverse video? For both the paste text and the search text? This is so bad for me that for the moment I had to revert to the previous version of bash to avoid it. (Note that disabling bracketed paste mode avoids it for the paste but doesn't address the reverse video of search.) The problem right now is that the "face" mechanism is very primitive compared to Emacs'. In Emacs, you can define the attributes of a face to be whatever you want: if you want to make readline highlight things in underlined red, more power to you. Bash's highlight face is hardcoded to use the terminal "standout" mode, which can mean whatever the terminal wants it to mean. Normally that's fine, but it seems like your terminal defines standout to be something ugly. It seems reasonable to add a knob to make bash's FACE_STANDOUT mean the same as FACE_NORMAL, but I think a better solution is to add an Emacs-like ability to define at runtime what each face actually means.
Re: Bash-5.1-rc1 available
Chet Ramey wrote: > This release fixes several outstanding bugs in bash-5.0 and introduces > several new features. An unlisted change (I couldn't locate it in the changes) is that 'reverse-search-history (C-r)' now highlights the search pattern. Is that because it is the search pattern or because it now sets the region? 'reverse-search-history (C-r)' Search backward starting at the current line and moving 'up' through the history as necessary. This is an incremental search. This command sets the region to the matched text and activates the mark. > f. New active mark and face feature: when enabled, it will highlight the text >inserted by a bracketed paste (the `active region') and the text found by >incremental and non-incremental history searches. I find the reverse video highlight to be very difficult to read. For me it is extreme eye strain. Is there a way to disable the reverse video? For both the paste text and the search text? This is so bad for me that for the moment I had to revert to the previous version of bash to avoid it. (Note that disabling bracketed paste mode avoids it for the paste but doesn't address the reverse video of search.) Bob
Bash-5.1-rc1 available
The first release candidate of bash-5.1 is now available with the URL ftp://ftp.cwru.edu/pub/bash/bash-5.1-rc1.tar.gz and from the bash-5.1-testing branch in the bash git repository (http://git.savannah.gnu.org/cgit/bash.git/log/?h=bash-5.1-testing). You can use git clone --branch bash-5.1-testing git://git.savannah.gnu.org/bash.git to clone the testing branch. The CWRU FTP site works best if your client supports Extended Passive (EPSV) mode. This tar file includes the formatted documentation (you should be able to generate updated versions yourself). This release fixes several outstanding bugs in bash-5.0 and introduces several new features. The most significant change is a return to the bash-4.4 behavior of not performing pathname expansion on a word that contains backslashes but does not contain any unquoted globbing special characters. This comes after a long POSIX discussion that resulted in a change to the standard. There are several changes regarding trap handling while reading from the terminal (e.g, for `read' and `select'.) There are a number of bug fixes, including several bugs that caused the shell to crash. Details are appended. The most notable new features are in the random number engine. There is a new variable, SRANDOM, which gets its random data from the system's entropy engine and so is not linear and cannot be reseeded to get an identical random sequence. The PROMPT_COMMANDS array variable can be used to run multiple commands before printing the primary prompt. Associative arrays may be assigned using a series of key-value pairs within a compound assignment. `wait' has a new `-p' option which stores PID information about the process reaped by `wait -n'. Process substitution is now available in posix mode. There are new parameter transformation operators. There is no new `compat50' option; use the BASH_COMPAT variable to select the compatibility level. All the new features are described below. There are a few incompatible changes between bash-5.0 and bash-5.1. The change to pathname expansion means that words containing backslashes, but no special globbing characters, will not undergo pathname expansion. While the bash-5.0 behavior was POSIX-conformant, the change was not well-received. Changes to the random number engines mean that seeding RANDOM will produce a different numeric sequence. Set the compatibility level to 50 to revert to the bash-5.0 behavior. `bashbug' may be used to report bugs with this version. It will send mail to chet.ra...@case.edu if the shell's `release status' is alpha or beta. As always, thanks for your help. Chet +== CHANGES ==+ This document details the changes between this version, bash-5.1-rc1, and the previous version, bash-5.1-beta. 1. Changes to Bash a. Fixed an inconsistency in the way HISTCMD is calculated when it's expanded during a multi-line command. b. Modified the change to here-document expansion containing backslash-quoted double quotes. c. Fixed a case where the shells's exit status could be greater than 255. d. Modified changed to process substitution so the executed command has its stdin redirected from /dev/null if it was previously interactive and reading commands from the terminal. 2. New Features in Bash a. There is a new contributed loadable builtin: asort. 3. Changes to Readline a. Fixed a bug that could cause an application with an application-specific redisplay function to crash if the line data structures had not been initialized. 4. New Features in Readline -- This document details the changes between this version, bash-5.1-beta, and the previous version, bash-5.1-alpha. 1. Changes to Bash a. Fixed a bug that caused name references to variables to not update the referenced variable's assignment side effects. b. Tightened up the parameter transformation error checking for invalid transformation operators. c. System-specific changes for: FreeBSD d. A few minor changes to move potential uses of stdio functions out of signal handling paths. e. Make sure SIGCHLD is blocked in all cases where waitchld() is not called from a signal handler. f. Changed `command' builtin processing so it no longer starts an extra process when run asynchronously (command x &). g. Avoid performing tilde expansion after `:' in words that look like assignment statements when in posix mode. h. Slight changes to how the `complete' builtin prints out options and actions for completion specifications. i. Several changes to how `local -' restores the values of options and $SHELLOPTS. j. Don't treat a word in a compound assignment as an assignment statement unless it has a valid subscript before the `='. k. Fixed a bug with the DEBUG trap and process substitution that caused the terminal's process group to be set incorrectly. l. Fixed a bug that left readline's signal handlers insta