I want to insert into alias different possible variants of spelling, for example, cat
command. Can I do it using some symbol for 'or' or should it be on a new line?
alias at|cart|cst '/bin/cat'
I want to insert into alias different possible variants of spelling, for example, cat
command. Can I do it using some symbol for 'or' or should it be on a new line?
alias at|cart|cst '/bin/cat'
The help for
alias
indicates that it can assign multiple aliases at once:So you can use brace expansion to generate the
name=value
pairs:So:
That said, look in to zsh, which has built-in typo correction (which wouldn't help for
at
, but it would help for the others):I don't think you can assign multiple aliases at once.
But you could loop through a list like this:
Make sure that the aliases are not already in use by other programs (like
at
in your example).