-
Notifications
You must be signed in to change notification settings - Fork 275
Alias
An alias is way to tell t-ui to interpret a set of characters as a proper command.
I usually try to ping google.com in order to check my internet connection speed:
ping -c 10 google.com
But it's really bothering to type everytime that long command.
So I create an alias like "pg" (Ping Google):
pg=ping -c 10 google.com
Now, anytime I want to check my internet speed I can simply type "pg", instead of that long command.
There are two ways:
- using a command
- editing alias.txt
You can use the command "alias -add" to append a new alias to your alias.txt. It's simple and fast, and you won't need to bother looking for the file, saving, checking syntax, etc.
There are only several negative aspects:
- you won't be able to create a "no named alias" (an alias with an empty name, that will be triggered when you hit enter and the input field is empty)
- you won't be able to create an alias whose name contains one or more spaces
The syntax is the following:
alias -add aliasname alias value
For example:
alias -add news search -g news
Use the command:
alias -file
Then, append this line to that file:
alias name=alias value
For example:
j=call Jonathan Jerry Johnson
You can also define a no-named alias:
=alias value
This is pretty useful when you don't want to waste time for an emergency, or something similar.
For example:
=call 112
(112 is the number of police).
Francesco Andreuzzi, Italy, [email protected]