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?


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).


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.