Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MauriceGit/Repeat_History
A small but useful command for a linux shell. It makes the bash history more easily accessible than cmd+r.
https://github.com/MauriceGit/Repeat_History
Last synced: about 1 month ago
JSON representation
A small but useful command for a linux shell. It makes the bash history more easily accessible than cmd+r.
- Host: GitHub
- URL: https://github.com/MauriceGit/Repeat_History
- Owner: MauriceGit
- License: isc
- Created: 2016-04-06T09:21:39.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-08-27T07:24:20.000Z (over 5 years ago)
- Last Synced: 2024-08-09T13:17:36.092Z (5 months ago)
- Language: Shell
- Size: 125 KB
- Stars: 19
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Repeat History
The script is meant to be a small addition for the linux bash.
It makes the bash history more easily accessible than going through Cmd+R manually, by listing a number (default 20) of last
commands. You can then just type the number of the command you would like to execute
from the list.It especially helps to get an overview of slightly different commands and makes it easier to select the right one.
## Install
Go to the cloned files and execute config.sh. When given no parameters, the script is given the system wide alias: **rh** (for: repeat history).
Otherwise you can specify the alias name as first argument to the config.sh script.
- ./config.sh [alias_name]
This appends the appropriate alias to your ~/.bashrc file.
You can alternately add it manually to your ~/.bashrc file (replace $PATH_TO_SCRIPT with the path to repeat_history.sh):
**alias rh='history -a && . $PATH_TO_SCRIPT/repeat_history.sh'**
## Usage
**rh [searchWord] [NumberOfMaxOptions]**
This command is now system wide accessible by typing **rh** into the terminal.
The first argument to **rh** is the search word for the command, you want to execute. If no argument is given, the last 20 executed commands are shown.
The second argument to **rh** changes the number of options to show.
## Screenshots
Some screenshots to see how it looks like.
Call to rh without arguments:
![rh without arguments](https://github.com/MauriceGit/Repeat_History/blob/master/Screenshots/example_1.png "rh without arguments")
Complete example:
![complete example](https://github.com/MauriceGit/Repeat_History/blob/master/Screenshots/example_2.png "complete example")
Example of rh without selection:
![rh invalid input](https://github.com/MauriceGit/Repeat_History/blob/master/Screenshots/example_3.png "rh with no selection")
## Todo
- Remove duplicates from the list so it is not spammed with the same command.
- Add usage and help output.