bind'set completion-ignore-case on' might be your friend in Bash. It won’t help in scripts and GUIs though, so you’d still have to deal with that.
There are ways to write functions that pick the right option intelligently, but that’s asking for trouble. One day something will create a better match for your guess and then things will go wrong, e.g. your script intelligently turns downloads into Downloads but then something actually goes and creates downloads. Your script chooses the impostor because it’s a better match. Oops.
And then there’s always ln -s Downloads downloads. That might be enough to confuse that helpful thing that would otherwise create downloads. It’s already there, ready for use. And it works in custom scripts and things too. Until you move your script to a different user or machine, anyway.
bind 'set completion-ignore-case on'
might be your friend in Bash. It won’t help in scripts and GUIs though, so you’d still have to deal with that.There are ways to write functions that pick the right option intelligently, but that’s asking for trouble. One day something will create a better match for your guess and then things will go wrong, e.g. your script intelligently turns
downloads
intoDownloads
but then something actually goes and createsdownloads
. Your script chooses the impostor because it’s a better match. Oops.And then there’s always
ln -s Downloads downloads
. That might be enough to confuse that helpful thing that would otherwise createdownloads
. It’s already there, ready for use. And it works in custom scripts and things too. Until you move your script to a different user or machine, anyway.