2014-02-21 21:18:09 +00:00
|
|
|
# alias
|
|
|
|
|
2016-10-12 16:58:04 +01:00
|
|
|
> Creates an alias for a word when used as the first word of a command.
|
2016-10-29 16:03:11 +01:00
|
|
|
> Note that these operations are not permanent, expiring when the current shell session ends.
|
2014-02-21 21:18:09 +00:00
|
|
|
|
2016-01-16 14:12:05 +00:00
|
|
|
- Create a generic alias:
|
2014-02-21 21:18:09 +00:00
|
|
|
|
|
|
|
`alias {{word}}="{{command}}"`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Remove an aliased command:
|
2014-02-21 21:18:09 +00:00
|
|
|
|
|
|
|
`unalias {{word}}`
|
|
|
|
|
2016-10-29 16:03:11 +01:00
|
|
|
- List all aliased words:
|
2014-02-21 21:18:09 +00:00
|
|
|
|
|
|
|
`alias -p`
|
|
|
|
|
2016-10-29 16:03:11 +01:00
|
|
|
- Turn rm into an interactive command:
|
2014-02-21 21:18:09 +00:00
|
|
|
|
|
|
|
`alias {{rm}}="{{rm -i}}"`
|
|
|
|
|
2016-10-29 16:03:11 +01:00
|
|
|
- Create `la` as a shortcut for `ls -a`:
|
2014-02-21 21:18:09 +00:00
|
|
|
|
2015-10-22 08:31:52 +01:00
|
|
|
`alias {{la}}="{{ls -a}}"`
|