User Tools

Site Tools


help:alias

Other: alias

Syntax: alias [<alias> [<value>]]

                                                                            
View, or set an alias.                                                      
                                                                            
When setting aliases, there are a number of variables that  are  replaced   
by the alias processor.                                                     
  $*  is replaced by the whole argument given to the alias,                 
  $1  is replaced by the first argument given,                              
  $2  is replaced by the second argument,                                   
  etc....                                                                   
                                                                            
Defaults can be given to each argument like so:                             
  $3{3rd}      (default of third argument is "3rd")                         
                                                                            
Examples:                                                                   
  alias gsl grin $1 smile $1 laugh $1                                       
  alias x look at $*                                                        
  alias grin grin $*{mischievously}                                         
  alias yas say $5 $4 $3 $2 $1                                              
                                                                            
Note:                                                                       
  Any alias defined without  a  variable  gains a $* wildcard at the end    
  automatically.                                                            
                                                                            

See also: unalias, history, input

help/alias.txt · Last modified: 2019/01/28 00:29 (external edit)