7

Many of the special Readline constructs allow the user to edit the command line in various ways. For instance, certain keystrokes allow moving forward a word. A word is defined to be what bash itself defines it to be.

Is it possible to set bash parameter(s) so that Readline defines a word to be something different other than what bash normally defines it to be? Say, any sequence of non-whitespace characters?

2 Answers2

2

As far as I know, the definition what is a word depends on the current locale settings.

The readline man page (bash uses readline for input handling) says:

Words are composed of alphanumeric characters (letters and digits).

jofel
  • 26,758
-1

Bash splits words by the $IFS variable, see https://www.gnu.org/software/bash/manual/html_node/Word-Splitting.html.

Note, that word selection (i.e. by doubleclicking the word) is configured in your terminal's settings.

allo
  • 946
  • 1
  • 7
  • 14
  • That is not the same way Readline splits words. For example, backward-word will move to a hyphen within a word, but that's not part of IFS. – l0b0 Apr 16 '20 at 23:49