Case insensitive aliases?

rado84

Well-Known Member
Joined
Feb 25, 2019
Messages
782
Reaction score
638
Credits
4,964
I wasn't sure if this topic is for the CLI subforum but since the question is partly about CLI, I decided to put it here.

I have over 200 aliases which I don't wanna nor I wanna redefine with capital letters, so I'm wondering if there's something to write in ~/.bashrc where the aliases are located in order to make them case insensitive. For instance, I have this alias "ffb" which executes several commands and creates a backup of Firefox's user profile. Sometimes I forget the Caps Lock activated and when I type "FFB", the terminal says there's no such a command.
I found this

Code:
setopt extendedglob
unsetopt CASE_GLOB

as a possible answer but I don't wanna do that globally (something tells me that the word "GLOB" means "globally" for the entire system), I want case insensitivity only for the aliases, so that when I type "FFB", the commands from the alias would still be executed.
 


Hi rado84.

I do not have nearly as many aliases as you, but your request seems to be a useful one.

I did a Duck search for "Case insensitive bash aliases" and found these websites. The info is too technical for me but you might find something of value.




Good luck.

Vektor
 

Members online


Top