4 ms·
> The feature I use the most is automatic history search by typing part of a command and hitting UP to search the history. This is available in bash/sh by sett
by dflock 9y ago
> The feature I use the most is automatic history search by typing part of a command and hitting UP to search the history.
This is available in bash/sh by setting this in your ~/.inputrc file:
"\e[A": history-search-backward
"\e[B": history-search-forward
"\e[C": forward-char
"\e[D": backward-char
- kevin_thibedeau 9y agoOr just use ctrl-R et al.
- ComputerGuru 9y agoI used bash first, then zsh. You have to try fish, it shows a "ghost" of the first matching autocompletion on the same line, which changes dynamically as you type. It also has a cool memory effect for figuring out history completions based off the directory you are in. Like csh on FreeBSD, alt+(up/down) can be used to search history for arguments instead of lines, so if you do something like touch some/long/directory/path/to/file .... rm so<ALT+up> fish will search all individual arguments (correctly handling quoted spaces, etc) for arguments starting with "so" and it'll suggest the path in question, even though the head here (`rm`) differs from the original (`touch` in this case).
- brokenmachine 9y agoThat sounds a bit dangerous, especially with rm. As always, with great power comes great responsibility I guess.