Wednesday, May 15, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 425  / 2 Years ago, wed, july 6, 2022, 10:50:15

I am a huge fan of aliases. this feature REALLY makes my life easier.
I have the following alias set:
alias ll="ls-lah"


However, I frequently fatfinger ll to ;;
As a solution, I attempted to alias ;; to "ls-lah"
However, the ;; characters are not accepted in the .bash_aliases file as legitimate input.
Similarly, I have tried ;; but still no love.


Is there a way to alias the input ;; ?


More From » bash

 Answers
3
> alias ';;'="ls -lah"
bash: alias: `;;': invalid alias name

Thus, bash does not allow creating this alias. So the answer to current question is: "no, there is no way to alias ";;" to "ll"?". ; is a reserved character in sh and bash to separate different commands on a single line.


[#726] Friday, July 8, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
lishrag

Total Points: 306
Total Questions: 109
Total Answers: 125

Location: Saint Lucia
Member since Wed, Feb 8, 2023
1 Year ago
;