mirror of
https://github.com/dvorka/hstr.git
synced 2024-09-20 06:46:13 +08:00
Finishing bash/Bash convetions.
This commit is contained in:
parent
5953729c2a
commit
524706c7e0
|
@ -12,7 +12,7 @@
|
|||
Please check man page for details and update your 1.x.x configuration.
|
||||
Ubuntu package name was changed - use: apt install hstr. Tarball name has been changed as
|
||||
well to have hstr prefix - please update your scripts.
|
||||
Additional improvements: all memory leaks fixed, long commands handling improved (...), Bash
|
||||
Additional improvements: all memory leaks fixed, long commands handling improved (...), bash
|
||||
autocomplete added.
|
||||
|
||||
2018-08-13 Martin Dvorak <martin.dvorak@mindforger.com>
|
||||
|
|
|
@ -16,7 +16,7 @@ want to avoid the need to write **long commands** over and over
|
|||
again? Are you looking for a tool that is able to manage your
|
||||
**favorite** commands?
|
||||
|
||||
HSTR (**H**i**ST**o**R**y) is a command line utility that brings improved Bash/zsh command completion
|
||||
HSTR (**H**i**ST**o**R**y) is a command line utility that brings improved bash/zsh command completion
|
||||
from the history. It aims to make completion **easier** and more **efficient**
|
||||
than <kbd>Ctrl-r</kbd>.
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ function tarballBuildUsingAutomake() {
|
|||
IS_MS=`grep Microsoft ${VENDOR_FILE}`
|
||||
if [[ ! -z "${IS_MS}" ]]
|
||||
then
|
||||
echo "DETECTED Bash on Linux on Windows (MS WSL)"
|
||||
echo "DETECTED bash on Linux on Windows (MS WSL)"
|
||||
touch ${HINT_FILE}
|
||||
else
|
||||
rm -vf ${HINT_FILE}
|
||||
|
|
|
@ -122,7 +122,7 @@ AC_CHECK_FILE(/tmp/hstr-ms-wsl,AC_DEFINE(__MS_WSL__), [])
|
|||
# Bash CLI autocomplete
|
||||
AC_ARG_WITH([bash-completion-dir],
|
||||
AS_HELP_STRING([--with-bash-completion-dir[=PATH]],
|
||||
[Install the Bash auto-completion script in this directory. @<:@default=yes@:>@]),
|
||||
[Install the bash auto-completion script in this directory. @<:@default=yes@:>@]),
|
||||
[],
|
||||
[with_bash_completion_dir=yes])
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ items is highlighted. Once you are done with your choice:
|
|||
|
||||
* press `ENTER` to choose the command and execute it
|
||||
* or press `TAB` or `RIGHT` arrow key to choose the command and edit it on command line after exiting HSTR
|
||||
* or press `LEFT` arrow key to choose the command and open it in editor (Bash `fc` i.e. fix command)
|
||||
* or press `LEFT` arrow key to choose the command and open it in editor (`bash` `fc` i.e. fix command)
|
||||
|
||||
|
||||
## Favorite Commands
|
||||
|
@ -124,7 +124,7 @@ Tips:
|
|||
it with your own blacklist.
|
||||
* You can skip any command from history just by
|
||||
prefixing it with `SPACE`. For example:
|
||||
` echo "Skip this from history"` It's a Bash
|
||||
` echo "Skip this from history"` It's a `bash`
|
||||
option that is configured using
|
||||
`HISTCONTROL=ignorespace` environment variable.
|
||||
|
||||
|
@ -162,7 +162,7 @@ Print history items containing 'git' to standard output and exit:
|
|||
hh --non-interactive git
|
||||
```
|
||||
|
||||
Append default `hh` configuration to your Bash profile:
|
||||
Append default `hh` configuration to your `bash` profile:
|
||||
|
||||
```bash
|
||||
hh --show-configuration >> ~/.bashrc
|
||||
|
|
|
@ -47,7 +47,7 @@ Toggle regular expression and substring search.
|
|||
Toggle case sensitive search.
|
||||
.TP
|
||||
\fBCtrl\-/\fR, \fBCtrl\-7\fR
|
||||
Rotate view of history as provided by Bash, ranked history ordered by the number of occurences/length/timestamp and favorites.
|
||||
Rotate view of history as provided by bash, ranked history ordered by the number of occurences/length/timestamp and favorites.
|
||||
.TP
|
||||
\fBCtrl\-f\fR
|
||||
Add currently selected command to favorites.
|
||||
|
|
|
@ -175,7 +175,7 @@ static const char* INSTALL_BASH_STRING=
|
|||
// It works correctly if memory entries are not deleted by HSTR. It doesn't synchronize history
|
||||
// across different bash sessions.
|
||||
// -c -r ... Forces entire .bash_history to be reloaded (handles history deletes, synchronizes different bash sessions)
|
||||
"\n# ensure synchronization between Bash memory and history file"
|
||||
"\n# ensure synchronization between bash memory and history file"
|
||||
"\nexport PROMPT_COMMAND=\"history -a; history -n; ${PROMPT_COMMAND}\""
|
||||
"\n# if this is interactive shell, then bind hstr to Ctrl-r (for Vi mode check doc)"
|
||||
#if defined(__MS_WSL__)
|
||||
|
|
Loading…
Reference in a new issue