When I delete a "word" in Bash, it will stop at certain characters like _
and /
. For example, if I type
/foo/bar
and activate backward-kill-word
(typically mapped to Alt-Backspace and/or Ctrl-w), the remaining text is
/foo/
. This does not correspond to $COMP_WORDBREAKS
or readline
's rl_completer_word_break_characters
. How can I detect (preferably in a running system, rather than the defaults in the code, since they presumably can be overridden) which characters are used to determine word breaks?
[^A-Za-z0-9]
,[^[:alnum:]]
(localization dependent) or something else? – l0b0 Jun 11 '13 at 10:47alnum
character class) though that would affect other applications as well. – Stéphane Chazelas Jun 11 '13 at 11:25isalnum
, so indeed locale-dependent and equivalent to your second version, @l0b0. – Mat Jun 11 '13 at 11:38