39
submitted 10 months ago by [email protected] to c/[email protected]

I accidentally discovered that both "cd ..." and "..." work, and moreover, I can add more dots to go back further! I'm using zsh on iTerm2 on macOS. I'm pretty sure this isn't a cd feature. Is this specific to zsh or iTerm2? Are there other cool features I just never knew existed??

I'm so excited about an extra dot right now.

you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 21 points 10 months ago

Actually cd isnt a program. Your present working directory is managed entirely by the shell. If you type "type cat" in the terminal it will tell you its a program, but "type cd" says its a shell builtin. So yes, cd depends on the shell and zsh has some awesome quality of life features. This is not something you can do in bash.

[-] [email protected] 4 points 10 months ago

I totally forgot! Makes sense that the implementation is shell-specific.

this post was submitted on 03 Nov 2023
39 points (100.0% liked)

Programming

13345 readers
1 users here now

All things programming and coding related. Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 1 year ago
MODERATORS