Skip to content
Francesco edited this page Jul 4, 2017 · 23 revisions

What is an alias?

An alias is way to tell t-ui to interpret a set of characters as a proper command.

Why should this be interesting?

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.

Nice! How do I create one?

There are two ways:

  • using a command
  • editing alias.txt

1. using a command

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

Clone this wiki locally