Closed GiselleSerate closed 6 years ago
alias pies='commands and stuff'
addalias limes="more commands"
alias 'dadhats'="do stuff"
addalias "snapbacks"='wow this is exciting'
call: lower/upper alphabetic
space: at least one
nickname: bookended by matching '
or "
, lower/upper alphanumeric and underscore
=: match identically
commands: bookended by matching '
or "
, some combination of any characters (.*)
How do you use k regex anyhow?
Now that we are using the altalias strategy as referenced in #46, things have changed.
.usr_aliases
? What will alias return and what gets written to file?I put garbage in and it says:
1
-bash: alias: erwiojgklelkmw: not found
Creating new permanent alias: alias aha='new command'
Then it dumps the current aliases into the terminal, which isn't, like, awful. (I need to get rid of that number, btw, wherever that's coming from, and I don't know what permanent alias it's trying to make with aha='new command'.)
Fixed as of commit 9cd23c903005b0b9ac2e4a3ded004bdbddaa5745.
You'll have to do this with regexes because people usually have spaces in quotes and weird stuff like that. Only do this check if the flag is present. If it is compliant with the regex, continue; if not, break.