Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: darwin18.7.0 Compiler: clang Compilation CFLAGS: -DSSH_SOURCE_BASHRC uname output: Darwin triton.parabon.com 18.7.0 Darwin Kernel Version 18.7.0: Tue Jun 22 19:37:08 PDT 2021; root:xnu-4903.278.70~1/RELEASE_X86_64 x86_64 Machine Type: x86_64-apple-darwin18.7.0
Bash Version: 5.1 Patch Level: 8 Release Status: release Description: The manpage for bash(1) says: unix-filename-rubout Kill the word behind point, ***USING WHITE SPACE AND THE SLASH CHARACTER AS THE WORD BOUNDARIES***. The killed text is saved on the kill-ring. [Emphasis mine] In certain circumstances, however, it gobbles up too much. [See below...] Repeat-By: ### Since we're dealing with ^w... ### 'set bind-tty-special-chars off' has the same results bash% stty werase undef ### Now set ^w to 'unix-filename-rubout' bash% bind '"\C-w": unix-filename-rubout' ### Simplest Minimal Reproducible Example: Type "echo /" and hit 'ctrl-w'. You'd expect it to stop at the space, and just go back to "echo ", but instead, it erases both words. :-( ### Here's a slightly longer example that shows more detail: bash% echo /path/one /path/two # Now ^w a few times: echo /path/one /path/ # OK echo /path/one / # OK echo /path/ # FAIL! PS: I'm hopeful there might be some kind of workaround that will work even on those dated releases! [crossing fingers] Thanks! -- :- Dabe