#MidnightCommander just told me, that setting the #CDPATH environment variable might be a good way to save some keystrokes when using the `cd` command.

I'm inclined to agree with him.

https://www.theunixschool.com/2012/04/what-is-cdpath.html

#Linux #UNIX

What is CDPATH ?

    Has it happened to you wherein you logged in to an account or to an environment and simply printed the command, say "cd log" and your d...

🌘 CDPATH:輕鬆在終端機中切換目錄
➤ CDPATH環境變數:在終端機中輕鬆導航目錄
https://www.writesoftwarewell.com/cdpath-easily-navigate-directories-in-the-terminal/
CDPATH環境變數允許您預先配置常用目錄,以便您可以從文件系統中的任何位置輕鬆進入其中。本文介紹了它的工作原理以及如何使用。
+ 這是一個很有用的功能,可以提升在終端機中切換目錄的效率。
+ 很棒的技巧!我從未想過可以在終端機中使用這種功能。
#終端機 #CDPATH #目錄導航
CDPATH: Easily Navigate Directories in the Terminal

The CDPATH environment variable lets you pre-configure frequently used directories so you can easily navigate into them from anywhere in your file system. This blog post shows how it works and how to use it.

Write Software, Well

@tschet Good point. For me, I have very many projects, and they are often changing. So #cdpath fits this case pretty well.

While not exactly what I said, it doesn't save that many characters but has somehow encouraged me to make my repos less scattered, which has been useful in my case...

Does anyone else use $CDPATH in #bash? I have CDPATH=~/git/, and can directly `cd` to any #git repository in that directory. It takes a :-separated list, just like PATH.

I've used it for a while and there don't seem to be many downsides - and it's motivated me to to keep my projects more organized than before. #shell #cdpath

C'est principalement le Memo 1 qui a inspiré les lecteurs de LinuxFr.org avec conseils pour ajout de deux nouvelles commandes :
- #pushd, #popd et #dirs : pour les allers et retours
- #CDPATH : pour les allés directs

https://www.grimoire-command.es/2018/memo_1.html

Et puis une belle partie sur la gestion des processus (en arrière plan) dans le Mémo 19 :

https://www.grimoire-command.es/2018/memo_19.html

Memo_1 : parcourir les dossiers et lister les fichiers

Table des matières 1. pwd : affiche le chemin du répertoire courant depuis la racine 2. ls : liste le contenu du répertoire courant 3. cd : changement de répertoire (change directory) 4. pushd, popd et dirs : pour les allers et retours 5. CDPATH : pour les allés directs 6. file : renvoie la nature …