Outils pour utilisateurs

Outils du site


issue188:c_c

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.

Dans ce numéro, j'aimerais vous parler de quelque chose qui améliorera votre qualité de vie. Bien que les pages man soient très utiles, je ne suis pas un barbu et je ne peux pas dire que j'en sois un fan. C'est une de ces choses qui vous sont imposées, que vous le vouliez ou non. Cependant, vous n'avez pas besoin de souffrir pendant votre voyage avec Linux à la maison.

Entrez dans mcfly (https://github.com/cantino/mcfly) et TL;DR (https://tldr.sh/)

Commençons par TL;DR :

Installation

Sur la page Web, ils proposent npm, mais la plupart d'entre vous n'auront pas installé npm : ••Si vous l'avez, c'est aussi simple que : npm install -g tldr ••Ou vous pouvez simplement utiliser le Python intégré : pip install tldr-man ••Les autres, comme moi, tapent simplement sudo apt install tldr

Maintenant, la toute première chose que vous devez faire, une fois installé, est de mettre à jour cette liste de commandes avec :

tldr -u

Une fois que vous avez fait cela, il vous suffit de taper tldr suivi d'un espace et de la commande dont vous avez besoin d'un exemple - si vous ne mettez pas la liste à jour, vous n'aurez rien.

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.

Honnêtement, cet outil m'a fait gagner des heures ! Parfois, vous voulez juste voir un exemple et ne pas être bombardé par des choses que personne n'utilise. Il n'est pas parfait, il manque encore quelques commandes, mais ce qu'il y a, c'est génial !

Passons maintenant à mcfly… pas Marty. [Cf. Retour vers le futur !]

C'est un remplacement complet de CTRL+R. Essentiellement, il stocke l'historique de votre shell pour suivre le statut de sortie des commandes, les horodatages et le répertoire d'exécution, dans une base de données SQLite qui lui est propre. Il n'a pas encore atteint la v1.0, mais il est aussi proche que putain l'est d'être utile de jurer.

Installation

La méthode préférée est via homebrew ou Linuxbrew, avec : ••brew tap cantino/mcfly https://github.com/cantino/mcfly ••brew install mcfly

Cependant, je n'utilise pas Linuxbrew et je l'ai donc installé via Curl.

Cette méthode nécessite un accès root ; aussi, il faut être très prudent !

sudo -s

curl -LSfs https://raw.githubusercontent.com/cantino/mcfly/master/ci/install.sh | sh -s – –git cantino/mcfly

Cela va récupérer la dernière version et l'installer pour vous.

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/

Vous devez l'ajouter à votre bashrc, afin qu'il soit disponible à chaque fois que vous vous connectez :

nano ~/.bashrc

et ajoutez simplement ce qui suit à la fin :

eval “$(mcfly init bash)”

Sauvegardez et vous pouvez lancer un rafraîchissement en ligne avec :

source ~/.bashrc

Attendez maintenant qu'il se termine.

Essayez-le avec :

mcfly search apt

Linode a une documentation impressionnante que je peux vous recommander : 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

De même, vous pouvez également « entraîner » l'IA de mcfly.

fs, fd :

En prime, je veux vous parler de la recherche en ligne de commande. Dans l'interface graphique, j'utilise simplement fs et sur la ligne de commande, j'utilise fd.

Vous pouvez le trouver ici : https://github.com/sharkdp/fd

Installation

Téléchargez le fichier .deb et utilisez votre installeur préféré.

Pour l'utiliser, tapez simplement fd et votre requête ; c'est rapide comme l'éclair.

Et juste comme ça, vous pouvez rechercher de l'aide, rechercher votre historique, et rechercher des fichiers sur le serveur que vous venez de recharger.

Nous espérons que cet article, qui était court et sympa, vous a été utile.

Quels sont vos favoris ? misc@fullcirclemagazine.org

issue188/c_c.txt · Dernière modification : 2023/01/06 14:28 de andre_domenech