Ceci est une ancienne révision du document !
In this issue, I would like to talk about something that will improve your quality of life. As much as manpages help, I am not a neckbeard and I cannot say that I am a fan. It’s one of those things that get forced on you whether you like it or not. However, your Linux journey at home does not need to suffer. Enter mcfly (https://github.com/cantino/mcfly) and TL;DR (https://tldr.sh/) Let’s start with TL;DR first: Installation On the web page, they offer npm, but most of you will not have npm installed: • If you do, it is as simple as : npm install -g tldr • Or you can just use built-in Python: pip install tldr-man • The rest, like me, simply type: sudo apt install tldr Now, the very first thing you need to do, once installed, is update that command list with: tldr -u Once you have done that, you simply type tldr followed by a space and the command you need an example of – if you do not update it, you will not get anything out of it.
Honestly, this tool has saved me hours! Sometimes, you just want to see an example, and not be bombarded by things nobody uses. It is not perfect, there are still a few commands missing, but what there is, is great! Now let’s move on to mcfly… not Marty. This is a complete replacement for CTRL+R. It basically stores your shell history to track command exit status, timestamps, and execution directory, in a SQLite database of its own. It has not reached a v1.0 yet, but it is as close as dammit is to swearing of being useful. Installation The preferred method is via homebrew or Linuxbrew, with: • brew tap cantino/mcfly https://github.com/cantino/mcfly • brew install mcfly However, I don’t use Linuxbrew, so I installed it via Curl. This way requires root access, so be very careful! sudo -s curl -LSfs https://raw.githubusercontent.com/cantino/mcfly/master/ci/install.sh | sh -s – –git cantino/mcfly This will grab the latest version and install it for you.
You want to add it to your bashrc, so it is available every time you log in: nano ~/.bashrc and simply add the following to the end: eval “$(mcfly init bash)” Save, and you can run an in-line refresh with: source ~/.bashrc Now wait for it to complete. Try it out with: mcfly search apt Linode has some awesome documentation I can recommend: https://www.linode.com/docs/guides/using-mcfly-to-search-bash-or-zsh-history/
As you can also ‘train’ the mcfly AI. fs, fd: As a bonus, I want to tell you about searching on the command-line. In the GUI, I simply use fs, and on the command-line I use fd. You can find it here: https://github.com/sharkdp/fd Installation Download the .deb-file and use your favourite installer. To use, simply type fd and your query; it is lightning fast. And just like that, you can search for help, search your history, and search for files on that server you just reloaded. Hopefully you found our short ‘n sweet article useful. What are your favourites? misc@fullcirclemagazine.org