“_” to the rescue
Programmer Humor
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
" is your friend
Yep, exactly. And tab. \ is weird at first but makes sense if you think about it
Windows is stupid as shit, trying to shift+right click > open Powershell in a path containing a space results in it throwing an error, and you have to paste the path in yourself anyway
Now I'm imagining a shell that looks iteratively through arguments to find where quotes would make total sense
$ ls
my victims.ods
$ wipe -f my victims.ods --thorough
So the shell would go like
wipe
→ command name found, ok-f
→ no file in the current directory starts with that, skipmy
→ matches a file, keep in memory...my victims.ods
→ full match, but missing quotes!- Prompt user:
Filename "my victims.ods" found without quotes. Choose:
[a]dd quotes this time
[A]lways add quotes (dangerous)
[n]o quotes today please
[N]ever offer adding quotes again
[t]ell me what could possibly go wrong when I choose to always add quotes
[P]unch the person who proposed this feature
For interactive use, tab-completion essentially makes this a non-issue, because shells add escaping in the appropriate places.
For scripting, where spaces are harder to deal with, unfortunately there's just not much you can do; your two options are basically to learn all of your particular shell's patterns for dealing with whitespace in filenames, or only write scripts in something other than a POSIX shell.
Mv /home/"$USER"/Downloads /home/"$USER"/downloads
capital letters.