- cross-posted to:
- programming@programming.dev
You must log in or # to comment.
I typically use
find "$HOME/docs"
, but with a few caveats:- In Zsh or Fish, the quotes are unnecessary:
find $HOME/docs
- If I’m using anything potentially destructive:
mv "${HOME:?}/bin" ...
- Of course, if it’s followed by a valid identifier character, I’ll add braces:
"${basename}_$num.txt"
- I’m pretty inconsistent when globbing:
"$HOME"/docs/*
or"$HOME/docs/"*
are common for me. - I don’t use
"${HOME}"
unless I actually need the braces. The reason? I write more Zsh than anything, and the braces are even less necessary in Zsh:#array[3]
actually gets the length of the third element of the array, rather than substituting the number of arguments, then the string'array[3]'
- In Zsh or Fish, the quotes are unnecessary: