Store, search and automatically paste all your favourite commands directly in your terminal with a new and faster way!
With the new TDLR-pages integration, you can quickly discover and select more than 10000 ready-to-use command examples, directly in your terminal.
How often do you need to reuse a command but you cannot remember it (with all the needed options/flags)?
# example of a common but not so 'easy-to-remember' bash command from my bash history
$ tar -xvzf file.tar.gz
How many times do you search the same commands on Google, over and over?
42 times.. yes.. based on my experience the answer is 42
And how many times have you told yourself to store this super useful command but you didn't?
I saved them all ..totally, with a good and detailed explanation for each command
if you know what I am talking about, fastHistory is the tool you are looking for!
fastHistory can save your commands directly from your terminal, all you need is a #
$ tar -xvzf file.tar.gz #
/\
\-- fastHistory will store 'tar -xvzf file.tar.gz' in its local database
You can specify one or more tags
$ tar -xvzf file.tar.gz #untar #extract #archive
or a description
$ tar -xvzf file.tar.gz #@extract compressed files from archive
or both
$ tar -xvf archive.tar.gz #untar @extract compressed files from archive
To search the saved commands, all you need is f and the selected command wiil be automatically pasted into your terminal!
$ f
For each stored command you can get a quick summary from the man page
note: this feature does not cover the syntax of all commands
And easily edit the tag and description fields
Furthermore, you can easily export/import all data to make backups or to share your commands with a different machine
$ f --export
$ f --import fastHistory_2020-03-02.db
In the Discovery mode, you can easily find examples of commands from the TDLR-pages, a collection of community-maintained help pages. The search works both by command name and description. Furthermore, the + icon shows you which command is already installed on your system.
FastHistory does not need any internet connection, so you can use it also offline!
fastHistory can work in any OS with python3
and a bash
terminal
zsh
is also supported!
OS | OS Version | Shell | Python versions | fastHistory version | Test mode | Comment |
---|---|---|---|---|---|---|
Ubuntu | 16.04, 18.04, 20.04* | bash | 3.6, 3.7, 3.8 | latest | unittest | * xclip may need to be installed to enable the copy-to-clipboard feature |
macOS | 10.15 | bash | 3.6, 3.7, 3.8 | latest | unittest | python3 needs to be installed |
Fedora | 29 | bash | 3.5 | 2.0.0 | manual | pip3 requires the --user flag |
Debian | 9 | bash | 3.5 | 2.3.6 | manual | |
Debian | 10 | zsh* | 3.7 | 2.0.0 | manual | *syntax limitation |
Windows* | 10 (1809) | bash | 3.6 | 2.4.1 | manual | *using the Windows Subsystem for Linux (WSL) you can execute and store Windows commands |
python3
python3-pip
(only for pip3 installation)
pip3 install fasthistory
$HOME/.local/bin/f
- close and reopen your terminal
Note: be sure to not use pip
(python2) nor sudo
(install it only for the current user)
- download the latest release with this easy-to-type link or manually download it
wget mkcn.me/f
- move it to the target system
- extract it and run the installer with the target user
tar -xvzf f
cd fastHistory-X.X
./installer.sh
- close and reopen your terminal
- (optional) delete installation files
rm -r f fastHistory-X.X
cd $(mktemp -d /tmp/f.XXXXX) && wget https://mkcn.me/f && tar -xvzf f && ./fastHistory-*/installer.sh && cd -
f --update
- close and reopen your terminal
pip3 install -U --no-cache-dir fasthistory
f
- close and reopen your terminal
- same steps as installation
Note: to update from the 1.x.x version your need to follow these steps
- download the installer script and make it executable
wget https://raw.githubusercontent.com/mkcn/fastHistory/master/installer.sh
chmod +x installer.sh
- run it with the uninstall flag
./installer.sh -u
Note: pip3 install fasthistory
is not sufficient to uninstall fastHistory
Find out more about commands and syntax in the Wiki section
- https://github.com/tldr-pages/tldr
- goal: collaborative cheatsheets for console commands
- changes: The page folder has been copied to support offline mode and the syntax modified to improve the search speed
- code section:
fastHistory/tldr/tldr/
- https://github.com/wong2/pick
- goal: python module modified to build the command-selection menu
- code section:
fastHistory/pick
- https://github.com/rcaloras/bash-preexec
- goal: bash script used to hook the commands from the terminal
- code section:
fastHistory/bash/bash-preexec.sh
- https://pypi.org/project/pyperclip/
- goal: copy-to-clipboard feature
- code section:
(optional) pip module
- https://pypi.org/project/bashlex/
- goal: parse commands to fill the 'Man page info' section
- code section:
(optional) pip module
The license for this is the same as that used by GNU bash, GNU GPL v3+.