https://github.com/brymck/print-alias
A Zsh plugin for printing expanded aliases
https://github.com/brymck/print-alias
Last synced: about 18 hours ago
JSON representation
A Zsh plugin for printing expanded aliases
- Host: GitHub
- URL: https://github.com/brymck/print-alias
- Owner: brymck
- License: mit
- Created: 2019-11-12T08:53:48.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-11-05T14:21:05.000Z (about 5 years ago)
- Last Synced: 2024-04-17T00:18:48.420Z (over 1 year ago)
- Language: Shell
- Size: 15.6 KB
- Stars: 15
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zsh-plugins - print-alias - Prints commands with aliases expanded whenever you use an alias at the command line. (Plugins / ZSH on Windows)
- fucking-awesome-zsh-plugins - print-alias - Prints commands with aliases expanded whenever you use an alias at the command line. (Plugins / ZSH on Windows)
- awesome-zsh-plugins - print-alias - Prints commands with aliases expanded whenever you use an alias at the command line. (Plugins / Zinit (née zplugin))
README
print-alias
===========

[](https://codecov.io/gh/brymck/print-alias)
This prints commands with aliases expanded whenever you use an alias at the command line.

Usage
-----
With [zplug](https://github.com/zplug/zplug), add the following to your `~/.zshrc`:
```zsh
zplug "brymck/print-alias"
```
You can also use [Antigen](https://github.com/zsh-users/antigen):
```zsh
antigen bundle brymck/print-alias
```
And lastly, if you want to `source` it manually, you can also clone this repo and use:
```zsh
source path/to/print-alias.plugin.zsh
```
Configuration
-------------
You can change the line prefix as well as the format of expanded aliases and non-aliases.
You can exclude some specific aliases to be displayed.
You may as well prevent any command which has been redefined by an alias to be displayed (aliases such as `alias grep='grep --colour'` or `alias ls='ls -aF'`)
```zsh
export PRINT_ALIAS_PREFIX=' ╰─> '
export PRINT_ALIAS_FORMAT=$'\e[1m'
export PRINT_NON_ALIAS_FORMAT=$'\e[0m'
export PRINT_ALIAS_IGNORE_REDEFINED_COMMANDS=true
export PRINT_ALIAS_IGNORE_ALIASES=(my_alias my_other_alias)
zplug "brymck/print-alias"
```
The above will result in output such as the second line here: