Skip Navigation
29 comments
  • First one, then the other, then I forget the quotes, then I put them in single quotes by accident, then I utilize that "default value" colon syntax in case I'm missing HOME , then I just stick to ~ for the rest of the file.

  • Typically 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"
29 comments