Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In scripts, yes, but they are not without their dangers and can be especially troublesome when working in the terminal since almost no one types out and checks the full paths constantly, they just let tab completion take care of it and assume it worked.

In scripts things like ../../../../file are a pain to read and assume everything in the script before all those previous dirs worked as it should have and everything is where it should be. Cd to an incorrect absolute path produces an error code so we can be sure we are in the proper dir, cd ../../../ will never produce an error and always succeeds even if you are at root.



> almost no one types out and checks the full paths constantly, they just let tab completion take care of it and assume it worked.

Are you a bootcamp coach having watched countless of people at the terminal? What makes you assume this is a general habit?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: