New answers tagged

3

Zsh does this provided that you enable the “new-style completion system” and turn on the complete_in_word option. autoload -U compinit; compinit setopt complete_in_word After that, you can press Tab anywhere in a word, including at the beginning, and you'll get completion proposals for the middle of the word (for the beginning, if the cursor is at the ...


0

I was able to achieve the desired behavior with this two lines in my bashrc: stty werase undef bind '\C-w: backward-kill-word' Still no idea about possible side-effects though. Edit: I found the proper way to set this in the inputrc without touching the bashrc and resorting to stty thanks to this article: set bind-tty-special-chars Off $if Bash \C-w: ...


1

bash is a termcap application via readline, like screen and some other programs. On most Linux-based systems (aside from Slackware), you're likely to see ncurses as underlying implementation of termcap. The manual page for tgetent (named curs_termcap because that's the way it was done in SVr4...) says: These routines are included as a conversion aid ...


2

Based on a meta discussion, I'm copying @steeldriver's perfectly good AU answer here: You appear to have configured readline to enable edit mode indication. From 8.3.1 Readline Init File Syntax of the Bash Reference Manual: show-mode-in-prompt (Off) If set to On, add a character to the beginning of the prompt indicating the editing ...


5

The Alt-. runs readline function yank-last-arg: yank-last-arg (M-., M-_) Insert the last argument to the previous command (the last word of the previous history entry). With a numeric argument, behave exactly like yank-nth-arg. Successive calls to yank-last-arg move back through the history list, inserting the last ...


3

You can get a list of the vi-related Readline function names by running this in bash: bind -P | grep -w vi Unfortunately, the documentation for these functions is lacking. The official documentation for the Readline library focuses more on Emacs mode and provides minimal information on how to use Vi-mode. In the short section, Readline vi Mode, it states ...


6

The short answer is that you can not use regular expressions to search the shell history. According to POSIX (the standard for Unix-like operating systems), you should be able to search using regular shell pattern matching (as used for filename globbing and with case statements). This feature is referred to as non-incremental search but it currently does not ...



Top 50 recent answers are included