-
Notifications
You must be signed in to change notification settings - Fork 278
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's 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
Francesco Andreuzzi, Italy, andreuzzi.francesco@gmail.com