Organiser of the Edinburgh Language Exchange and The Edinburgh Open Tech Scene |
Full Snack Developer 🥪, Ramen guzzler 🍜, quiche murderer 🥧. A friendly cat.
The only thing is.... why cd "$1" || exit ? If for some reason there's, say, a permission issue on that folder, or a broken symlink, exit will actually terminate your current shell session... surely not the effect you want from a function? Likely this should be return
Yes, I absolutely agree (the thing is I it realized sometime later after I first published the blog)
I have updated it now
thanks for pointing it out 👍
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
That's pretty neat !
The only thing is.... why
cd "$1" || exit
? If for some reason there's, say, a permission issue on that folder, or a broken symlink,exit
will actually terminate your current shell session... surely not the effect you want from a function? Likely this should bereturn
Yes, I absolutely agree (the thing is I it realized sometime later after I first published the blog)
I have updated it now
thanks for pointing it out 👍