3 added 338 characters in body
source | link

In bash, pressing Tab invokes the programmable completion feature and either (a) expands to a unique path or command matching what's typed or (b) a list of possible options.

Is it possible to undo the entire expansion made by pressing Tab?

Example:

  1. My current command is ls application/views/.
  2. There are two possible expansions on that command: helpers/ and scripts/.
  3. I type heTab, which expands to helpers/.
  4. I realize I meant the other one scripts.
  5. Now I have to delete the entire expansion "helpers/".

I usually just backspace over the entire path (helpers/ in this case), because I find striking readline undo Control+_ tedious. What I'd like is a single key sequence that deletes the full match of the expansion, regardless of any characters I initially typed and any spaces or slashes added to the end.


Running list of key sequences that do not accomplish the goal, either fromsuggested by comments or frommy own read of the GNU reference. None of these accomplish the goal:

  • Meta+b -- Moves back to the previous / or , but doesn't delete.
  • ControlMeta+WDel -- Deletes the entire previous wordone character, which is the entire full path not just the expanded componententire word.
  • Meta+DelBackspace -- DeletesMoves back one character without deleting.
  • Control+W -- Deletes the entire path, not just the entire wordexpansion. So in my example, after pressing Tab, bash expands that to ls application/views/helpers, then when I press Control+W, bash deletes application/views/helpers.

If relevant, I'm using the vi editing mode on a Gentoo Linux box. I've checked my configuration and I've not remapped any characters.

In bash, pressing Tab invokes the programmable completion feature and either (a) expands to a unique path or command matching what's typed or (b) a list of possible options.

Is it possible to undo the entire expansion made by pressing Tab?

Example:

  1. My current command is ls application/views/.
  2. There are two possible expansions on that command: helpers/ and scripts/.
  3. I type heTab, which expands to helpers/.
  4. I realize I meant the other one scripts.
  5. Now I have to delete the entire expansion "helpers/".

I usually just backspace over the entire path (helpers/ in this case), because I find striking readline undo Control+_ tedious. What I'd like is a single key sequence that deletes the full match of the expansion, regardless of any characters I initially typed and any spaces or slashes added to the end.


Running list of key sequences that do not accomplish the goal, either from comments or from the GNU reference:

  • Meta+b -- Moves back to the previous / or , but doesn't delete.
  • Control+W -- Deletes the entire previous word, which is the entire full path not just the expanded component.
  • Meta+Del -- Deletes one character, not the entire word.

If relevant, I'm using the vi editing mode.

In bash, pressing Tab invokes the programmable completion feature and either (a) expands to a unique path or command matching what's typed or (b) a list of possible options.

Is it possible to undo the entire expansion made by pressing Tab?

Example:

  1. My current command is ls application/views/.
  2. There are two possible expansions on that command: helpers/ and scripts/.
  3. I type heTab, which expands to helpers/.
  4. I realize I meant the other one scripts.
  5. Now I have to delete the entire expansion "helpers/".

I usually just backspace over the entire path (helpers/ in this case), because I find striking readline undo Control+_ tedious. What I'd like is a single key sequence that deletes the full match of the expansion, regardless of any characters I initially typed and any spaces or slashes added to the end.


Running list of key sequences suggested by comments or my own read of the GNU reference. None of these accomplish the goal:

  • Meta+b -- Moves back to the previous / or , but doesn't delete.
  • Meta+Del -- Deletes one character, not the entire word.
  • Meta+Backspace -- Moves back one character without deleting.
  • Control+W -- Deletes the entire path, not just the expansion. So in my example, after pressing Tab, bash expands that to ls application/views/helpers, then when I press Control+W, bash deletes application/views/helpers.

If relevant, I'm using the vi editing mode on a Gentoo Linux box. I've checked my configuration and I've not remapped any characters.

2 added 538 characters in body
source | link

In bash, pressing Tab invokes the programmable completion feature and either (a) expands to a unique path or command matching what's typed or (b) a list of possible options.

Is it possible to undo the entire expansion made by pressing Tab?

Example:

  1. My current command is ls application/views/.
  2. There are two possible expansions on that command: helpers/ and scripts/.
  3. I type heTab, which expands to helpers/.
  4. I realize I meant the other one scripts.
  5. Now I have to delete the entire expansion "helpers/".

I usually just backspace over the entire path (helpers/ in this case), because I find striking readline undo Control+_ tedious. What I'd like is a single key sequence that deletes the full match of the expansion, regardless of any characters I initially typed and any spaces or slashes added to the end.


Running list of key sequences that do not accomplish the goal, either from comments or from the GNU reference:

  • Meta+b -- Moves back to the previous / or , but doesn't delete.
  • Control+W -- Deletes the entire previous word, which is the entire full path not just the expanded component.
  • Meta+Del -- Deletes one character, not the entire word.

If relevant, I'm using the vi editing mode.

In bash, pressing Tab invokes the programmable completion feature and either (a) expands to a unique path or command matching what's typed or (b) a list of possible options.

Is it possible to undo the entire expansion made by pressing Tab?

Example:

  1. My current command is ls application/views/.
  2. There are two possible expansions on that command: helpers/ and scripts/.
  3. I type heTab, which expands to helpers/.
  4. I realize I meant the other one scripts.
  5. Now I have to delete the entire expansion "helpers/".

I usually just backspace over the entire path (helpers/ in this case), because I find striking readline undo Control+_ tedious. What I'd like is a single key sequence that deletes the full match of the expansion, regardless of any characters I initially typed and any spaces or slashes added to the end.

In bash, pressing Tab invokes the programmable completion feature and either (a) expands to a unique path or command matching what's typed or (b) a list of possible options.

Is it possible to undo the entire expansion made by pressing Tab?

Example:

  1. My current command is ls application/views/.
  2. There are two possible expansions on that command: helpers/ and scripts/.
  3. I type heTab, which expands to helpers/.
  4. I realize I meant the other one scripts.
  5. Now I have to delete the entire expansion "helpers/".

I usually just backspace over the entire path (helpers/ in this case), because I find striking readline undo Control+_ tedious. What I'd like is a single key sequence that deletes the full match of the expansion, regardless of any characters I initially typed and any spaces or slashes added to the end.


Running list of key sequences that do not accomplish the goal, either from comments or from the GNU reference:

  • Meta+b -- Moves back to the previous / or , but doesn't delete.
  • Control+W -- Deletes the entire previous word, which is the entire full path not just the expanded component.
  • Meta+Del -- Deletes one character, not the entire word.

If relevant, I'm using the vi editing mode.

1
source | link

Undo tab expansion?

In bash, pressing Tab invokes the programmable completion feature and either (a) expands to a unique path or command matching what's typed or (b) a list of possible options.

Is it possible to undo the entire expansion made by pressing Tab?

Example:

  1. My current command is ls application/views/.
  2. There are two possible expansions on that command: helpers/ and scripts/.
  3. I type heTab, which expands to helpers/.
  4. I realize I meant the other one scripts.
  5. Now I have to delete the entire expansion "helpers/".

I usually just backspace over the entire path (helpers/ in this case), because I find striking readline undo Control+_ tedious. What I'd like is a single key sequence that deletes the full match of the expansion, regardless of any characters I initially typed and any spaces or slashes added to the end.