|
|
|
|
|
by enriquto
2438 days ago
|
|
True! Also the mixing of upper and lower-case directories on ~ is a red flag. Offtopic, but this kind of one-line conditions are typically best written as test -d ~/dev/go && export GOPATH=~/dev/go
then it is easier tho change the sign of the condition (by using either || or &&) |
|
I opt for the if-brackets rather than the one line syntax because it is clearer to read. “if this, then that” is less mental effort than remembering just how boolean operators short circuit, for me at least. It's a few extra lines but I prefer the layout, indent, and ease of scanning.