-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# alias | ||
|
||
Create short-hand commands for longer or frequently used commands. | ||
|
||
!!! note | ||
Yantra Launcher saves all aliases in memory and is retained even after restarting the Launcher session, unlike the _aliases_ in Unix terminals. | ||
|
||
!!! note | ||
Pre-defined commands can not be aliased. | ||
|
||
## Syntax | ||
To set an alias: | ||
``` | ||
alias alias_name = alias_cmd | ||
``` | ||
|
||
To get value of an alias: | ||
``` | ||
alias alias_name | ||
``` | ||
|
||
To list all aliases: | ||
``` | ||
alias | ||
``` | ||
|
||
To reset all aliases to default: | ||
``` | ||
alias -1 | ||
``` | ||
|
||
## Examples | ||
|
||
=== "Example I" | ||
``` title="Simple command alias" | ||
alias h = help | ||
``` | ||
This will create an alias `h` for the `help` command. | ||
|
||
=== "Example II" | ||
``` title="Alias with arguments" | ||
alias ps = search -playstore | ||
``` | ||
This will create an alias `ps` for the `search -playstore` command. This will let you search the Play Store with the `ps` command. | ||
``` | ||
ps Yantra Launcher | ||
``` | ||
|
||
=== "Example III" | ||
``` title="Alias for app launch" | ||
alias cod = launch call of duty | ||
``` | ||
This will create an alias `cod` for the `launch call of duty` command. This will let you launch Call of Duty with the `cod` command. |