4 Matching Annotations
  1. Apr 2025
    1. I've noticed somethings, particularly ADB commands, use spaces to issue the next part of the command. Thus having a space would say that there's a new command. And since hyphens are actually used in some spelling, such as my last name, it's better to use underscores.
    1. With so many characters that you might not think should be special, in fact being special, I just use the special characters anyway. This also puts me in the good habits of using bash completion, where it will auto-escape all the special characters in a filename. But it also puts me in the good habits of escaping/quoting EVERYTHING in scripts and multi-part 1-liners in bash. For example, in just a simple 1-liner: for file in *.txt; do something.sh "$file"; done That way, even if one of the files has a space, or some other character, the do part of the loop will still act on it, and not miss on 2 or more file-name-parts, possibly causing unintended side-effects. Since I cannot control the space/not-space naming of EVERY file I encounter, and if I tried, it would probably break some symlinks somewhere, causing yet more unintended consequences, I just expect that all filename/directoryname could have spaces in it, and just quote/escape all variables to compensate. So, then I just use whatever characters I want (often spaces) in filenames. I even use spaces in ZFS dataset names, which I have to admit has caused a fair amount of head-scratching among the developers that write the software for the NAS I use. Sum-up: Spaces are not an invalid character, so there's no reason not to use them.
    1. I must be the exception, because I use both spaces and underscores, depending on circumstances.   The practical/obsessive-compulsive side of me saves all my documents using spaces. They're cleaner to read than underscores, and they look far more professional.   The programmer side of me still uses underscores in files that will be accessible via the web or that need to be parsed in a program.   And to complicate matters worse, I use camel case to name all my programming files. So in actuality I use 3 standards interchangeably.   Both have their uses, I just choose one for clarity and one for ease of use.