I am trying to write a bash script to auto-complete my email address. So my goal is whenever I type foo
in terminal and hit tab
it completes it with [email protected]
.
So far I read these links:
https://unix.stackexchange.com/questions/1800/how-to-specify-a-custom-autocomplete-for-specific-commands?newreg=8f29593bf62a4dcb92c96c33219271fd
https://debian-administration.org/article/317/An_introduction_to_bash_completion_part_2
But I couldn't achieve as both of them make auto-complete like foo [tab]
.
I'm sorry if I couldn't explain my question well but I don't want that space after foo
.
Thanks in advance.