Package: term-cheat
TermCheat: your terminal cheat sheetSynopsisTermCheat is a searchable library of commands that you can copy remix and extend.Usageterm-cheatEven better if you add a keyboard shortcut to start TermCheat e.g.CtrlaAdd this to your.bashrcor.zshrcor ...bindkey -s '^A' 'term-cheat --filter^M'-ssimulate keyboard input^ACtrla^MEnterkey to run the commandKeyboard ShortcutsInlistmodeenterexecute command/to fuzzy filter / search for a commandaadd new commandeedit selected commandddelected the selected commandIneditmodeescto leave edit mode without savingctrl oto save the command to your databaseInfiltermodeescto clear the filterInstallationWhile the package is waiting for approval from the snap store you can install it by downloading it from here and installing it with snap.curl -OL https://github.com/select/term-cheat/releases/download/0.1.11/term-cheat-0.1.11_amd64.snap
sudo snap install --classic --dangerous term-cheat-0.1.11_amd64.snapTo install it from source do the following.gitclonehttps://github.com/select/term-cheat.gitcdterm-cheat
pipenvinstall
pipenvshell
python3term-cheat-appRelated Tools and ProjectsReveser History SearchSearch through your shell history withCtrlRAliasCreate a file that contains aliases for your most used commands.
Create a the aliases file withtouch ~/.aliasesand add some aliases likealias lt='ls -ltr'
alias df='pydf -h -B'now source the file in your.bashrcor.zshrcsource $HOME/.aliasesYou could write all aliases directly in you rc file but this way it's more portable if you switch from e.g. bash to zsh.Another trick is to sort your history for the commands you use the most and created aliases for these commands to save you time. Here is a command to get your top ten most used commands:history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl |  head -n10AutosuggestionsIf you are using zsh there is a neat plugin calledzsh-autosuggestionswhich will automatically show you suggestions of commands you used before that you can complete using the right arrow key.More Related Projects\tldrbropagesegcheatIf you got other suggestions I would love to include them here.MotivationThere are two reasons why I created TermCheat. First of all I love using the terminal and lately I have been learning more things like systemd and just could not remember all the commands on the first go. While I use thezsh-autosuggestionsplugin and reverse history search (ctrlr) I still had sometimes problems to recall commands. Furthermore both of these options to not give any additional information about the commands. Most modern editors (sublime-text, atom, ...) now have the option to search for commands with ctrl p which I find super helpful.The second reason which is even more important for me is that I find text base user interface (tui) very cool. They give you a proper hacker feeling and if done right are beautiful and fast. I wanted to challenge myself and see if I could build such an interface, and voila two weekends later I had the first version of TermCheat running. After working many years on web based interfaces building a tui is a really nice experience because it's pure minimalism.LicenseTermCheat is released under theMIT License.