$ cd ..
$ ls
$ cd ..
$ ls
"hmm yes.. everything seems to be in order"

$ cd ..
$ ls
$ cd ..
$ ls
"hmm yes.. everything seems to be in order"

cd ..
β‘ β
β‘ β
β‘ β
In your rc:
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
Usage:
1/2/3 $ ...
1 $
..... for zsh users
Excuse me what? I've been multi cd'ing for years like a chump?
Exactly. The fucking what now?
Depending on where you are, maybe just "cd".
alias cd..='cd ..'
alias cd...='cd ../..'
alias cd....='cd ../../..
alias cd.....='cd ../../../..'
Then forget all that and just use
cd ~ or cd /
I alias .. to cd ..
Works for me π€·π»
I do that too!
I also alias ... to cd ../... I'll be honest, I often forget to do it, but in theory it can speed things up.
Installing zoxide led me to installing fzf, which has improved my terminal experience by about 35%, I already installed it in all the machines I'm managing
Got any more tools? :)
Check out Atuin. Its another must have for me. When you push up arrow, it shows your command history in a very pleasing list. You can even generate account keys to migrate your history between PCs, but I've never bothered with it. You can also search past commands on the history menu.
You don't need an account for it. That's only for the migration keys.
Or the alias I have set up
β¦..
I kept saying "cd up" in my mind so I just made an alias for cdu, became a reflex within the next day
i use fish shell with https://github.com/nickeb96/puffer-fish
basically when i type ... it expands to ../.. and adds another /.. for every additional dot i type
its similar to what the zsh users in the comment section are doing
You forgot the pwd after each 'cd'.
cd .....
I use zsh btw
Me doing it the worst way > opening up dolphin(file explorer) navigating to the folder then opening terminal there.
alias ..='cd ..' #: up one directory
alias ...='cd ../..' #: up two directories
alias .4=cd ../../../..
cd .. && ls
!!
!!
!!
!!
Tbf it is less key presses since you can generally just recall the last command.
~$ mkdir -p 1/2/3/4
~$ pushd 1
~/1 ~
1$ pushd 2/3/4
~/1/2/3/4 ~/1 ~
4$ popd
~/1 ~
1$
Easiest solution, use fish instead of bash! Default fish keybindings will allow you to just type . . or name a directory similar to how you could do with Zoxide.
Also, wait until you find about pushd and popd ;)
cd - helps
top 50 comments