this post was submitted on 16 Jul 2023
182 points (97.4% liked)

linuxmasterrace

2166 readers
1 users here now

A community for Linux enthusiasts.

May your htop stats be low and your beard grow long

Welcome to !linuxmasterrace@feddit.de former r/linuxmasterrace members and existing Lemmyverse citizens: Feel free to join the newly created !linuxmasterrace@feddit.de community.

Let’s make the full transition to the decentralized Fediverse!

founded 1 year ago
MODERATORS
 

I’m moving my posts from Reddit to Lemmy before delete them.

This post is from 2020-09-03.

you are viewing a single comment's thread
view the rest of the comments
[–] argv_minus_one@beehaw.org 5 points 1 year ago (3 children)

Automatic cd: Zsh simplifies directory navigation by enabling users to change directories simply by typing the name of the desired directory. This feature eliminates the need to type the “cd” command explicitly, saving time and keystrokes.

What if there happens to be a command with the same name?

[–] Still@programming.dev 6 points 1 year ago (1 children)

command goes first

order is shell built in > path > autocd

[–] argv_minus_one@beehaw.org 9 points 1 year ago (2 children)

Then you're likely to enter a command by accident. I would consider that a dangerous misfeature and look to turn it off.

[–] Still@programming.dev 4 points 1 year ago (1 children)

not really tab complete puts a / at the end of autocd directories

[–] argv_minus_one@beehaw.org 4 points 1 year ago (1 children)

Can you not type in the name of the hazardous folder yourself? I'm envisioning trying to autocd into a folder named reboot or something.

[–] Still@programming.dev 1 points 1 year ago (1 children)
[–] argv_minus_one@beehaw.org 1 points 1 year ago* (last edited 1 year ago) (1 children)

Does autocd not work without a slash at the end?

[–] Still@programming.dev 2 points 1 year ago

it does but if you had a file called reboot tab complete would complete the reboot command and not put the slash thwre, adding the slash specifies that it's a directory

[–] gamma@programming.dev 3 points 1 year ago

I've got syntax highlighting enabked, so I always notice the different color when I type a commnand.

[–] branchial@feddit.de 3 points 1 year ago (1 children)

Don't name your directories "rm" or "fdisk" problems solved

[–] argv_minus_one@beehaw.org 2 points 1 year ago

Until I forget about some command or another, and accidentally give a folder the same name.

[–] branchial@feddit.de 2 points 1 year ago

Don't name your directories "rm" or "fdisk" problems solved