Skip to content

Latest commit

 

History

History
68 lines (48 loc) · 1.59 KB

usage.md

File metadata and controls

68 lines (48 loc) · 1.59 KB

Usage

History recovery/sychronization:

Usage with other tools:

History recovery/synchronization

By path

Recovering command history related to the specific directory is done with:

hm /path/of/interest

or for the current working directory:

hm .

All commands executed in the specified directory are combined together and placed at the beginning of the bash built-in history, so it is possible to walk through them using button.

To include commands executed in the nested folders add -R flag:

hm . -R

TODO: It is possible to filter out commnads containing specified words:

hm . --exclude "cd ls git"

By session name

To set a terminal session name and to recover the command history related to this name run the following:

hm -s "Session Name"

To synchronize history with the database using the previously given name:

hm -s

To query the previously given name:

hm -i

TODO: It is possible to filter out commnads containing specified words the same way as in per-directory history recovery.

Using both criteria

Both path and session name can be combined together in a single recovery request:

hm /some/path -s "Session Name"

Usage with other tools

hstr

History manager is completely compatible with hstr - a history suggest box which allows to easily view, navigate and search your command history.