3 ms·
I mostly use Linux, but I use a terminal 99% of the time, so it's irrelevant. I have the same setup on a Mac. I have a few top-level directories, and a little
by Symbiote 8y ago
I mostly use Linux, but I use a terminal 99% of the time, so it's irrelevant. I have the same setup on a Mac.
I have a few top-level directories, and a little structure beneath that — little enough that I remember most of it. My home computer directories are Code, Documents, $EmployerName, Media, Music, Photography, Temp (excluded from the backup), Web.
Yes, those are capital letters. I think they're neater, and it doesn't slow me down since I have several Zsh settings and functions to navigate quickly:
ls ~/d/t/p.j<TAB>
→ Completes to ls ~/Documents/Travel/Passport\ scan.jpg
This was configured using the zsh "compinstall" function –
case-insensitive and partial completions.
cd ~w<TAB>
→ Completes to cd ~/Web
This is because I've done: hash Web=~/Web
This is the least useful, but could be useful for people
who like deep directory structures.
cd n-w<TAB>
→ Completes to cd ~/Code/new-website
This is because I've done: export cdpath=( ~/Code )
It's important not to put too much in cdpath, as it clashes
with the contents of the current directory.
emacs m/m-s/s/m/j/o/e/<TAB>
→ Partially completes to:
emacs ~/Code/maven-project/maven-s/s/m/j/o/e/
with the cursor after the s, because there are two possible
directories. I can type "<TAB><TAB>" to see the possible completions, or type "u<TAB>" since I know that will complete to
emacs ~/Code/maven-project/maven-sub/src/main/java/org/example/
I also have shell function for quickly finding by filename:
f () {
echo "find . -iname \"*$1*\""
find . -iname "*$1*"
}
I'm also using the UK Dvorak layout. Either UK layout puts ~ in a nicer place, and Dvorak puts / and - in a nicer place, so although it's less effort that it might appear to a US Qwerty user to type these so much.