I’ve used a script that made ‘up 4’ a thing. Forgot to migrate it though.
Biggest issue I have with custom macros is I’m logging into like 5 different machines a day. Don’t wanna keep copying over my custom bash files. Prefer built-in commands.
Yeah, I get that. But I’m traversing my machine a lot while developing, so I want that as hassle free as possible.
Heyy I have that in my .bashrc
Works a charmHad it in my .zshrc. I should look for it, it was helpful
https://www.gnu.org/software/bash/manual/html_node/Bourne-Shell-Builtins.html#index-cd
TIL about $CDPATH may have to populate that!
cd .. ls ls -la cd .. ls cd .. rm -rf /
cd … ls cd … ls cd … ls cd … ls
$ cd .. $ ls $ cd .. $ ls
“hmm yes… everything seems to be in order”
Depending on where you are, maybe just “cd”.
Smh when are you going to upgrade to dvd
I alias
..
tocd ..
Works for me 🤷🏻
I do that too!
I also aliasto
cd ../..
. I’ll be honest, I often forget to do it, but in theory it can speed things up.
cd ./…
cd …/._Honestly I haven’t tried this on Linux yet, but didn’t Windows implement this somewhere along the way?..
cd ....
I believe,
zsh
supports that.Interesting, I might have to check that out someday.
Though when I write scripts, I’m not a fan of blind folder navigation like that, there’s a good reason for the pushd and popd script commands.
Oh yeah, I wouldn’t use that for scripts. I wouldn’t use
zsh
for scripts either.
I mean, I believe, it’s generally compatible withbash
, but just throwing a shebang likeor
into the first line of the script will make it execute with
sh
orbash
, even when you run it fromzsh
.
Windows be like
cd …
ls
grumble grumble
dir
Wanna fix that real quick?
echo @dir %1 %2 %3 %4>%SystemRoot%\System32\ls.bat
I aliased
cd
to a custom funtion in my bashrc to do this at one point, butcd ../../../..
is too engrained so I never rembered to use it.You will probably like zoxide (i am not sure about policy on links here, but here you go https://github.com/ajeetdsouza/zoxide)
Zoxide is nice, or use Yazi so you can actually see where you’re going.
Try zoxide
Yup. I usually have zoxide installed. It’s grand.
Me doing it the worst way > opening up dolphin(file explorer) navigating to the folder then opening terminal there.
Or the alias I have set up
……
Ya, this is the way. I use
all the time
Once you’ve typed … you know if you type more dots it’s to go up more dir, so you don’t really need two dots for each additional dir.
Yeah so it was five dots for four directories up. I also have
… for 2
And
…. for 3
I don’t think I have one for 5. I’d have to look. I also use autojump and fzf which is very useful.
I kept saying “cd up” in my mind so I just made an alias for
cdu
, became a reflex within the next day
Tbf it is less key presses since you can generally just recall the last command.
The
history
of the CTO at a previous job was filled withdc
andsl
because he was a fucking moron. Yes I’m still bitter that he earned way more money than me who had to fix all his mess.You could have gifted him some silly fun with the
sl
package.
Why no cd /////// speceficterm if you know how deep it is
Those are supposed to be stars. I’m not fixing this on a phone