https://github.com/benavern/z-alias
Edit your bash aliases the funny way
https://github.com/benavern/z-alias
alias bash cli
Last synced: 6 months ago
JSON representation
Edit your bash aliases the funny way
- Host: GitHub
- URL: https://github.com/benavern/z-alias
- Owner: benavern
- License: mit
- Created: 2020-05-03T14:12:03.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T04:53:57.000Z (over 3 years ago)
- Last Synced: 2024-08-09T22:51:32.190Z (over 1 year ago)
- Topics: alias, bash, cli
- Language: JavaScript
- Size: 458 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Z-ALIAS
> Edit your bash aliases the funny way
[](https://www.npmjs.com/package/z-alias)
## About
This project provides an easy solution for using **aliases** from your command line. `z-alias` solves the hassle of remembering how to create / edit / delete your aliases.
## Install
```bash
npm i -g z-alias
```
## Usage
```bash
z-alias -h
```
```
Usage:
$ z-alias [options] [arguments]
Options:
--list, -l List all aliases
--open, -o Open aliases file in your favorite editor
--search, -s Search in aliases
--add, -a Add an alias
--edit, -e Edit an alias
--remove, -r Remove an alias
--help, -h Display help
--version, -v Print z-alias version
Examples:
$ z-alias -l
$ z-alias -o
$ z-alias -s [ ...]
$ z-alias -a [ ""]
$ z-alias -e [ ""]
$ z-alias -r [ ...]
Configuration:
* To change the path of the aliases file, paste and adapt this line
at the end of your .bashrc file.
export Z_ALIAS_FILE=~/.bash_aliases
* To make your aliases available in all new shells paste this line
at the end of your .bashrc file (adapt if above line has been added).
if [ -f ~/.bash_aliases ]; then source ~/.bash_aliases; fi
```
## Config
In your `~/.bashrc`, `~/.zshrc`, ...
### Change aliases file path
If not set, defaults to : `~/.bash_aliases`
```
# Change aliases file path
export Z_ALIAS_FILE="/path/to/aliases"
```
### Make your aliases available on all shells
Add that block at the end or your `.bashrc` or `.zshrc` file.
```
# Make aliases available
if [ -f ~/.bash_aliases ]; then source ~/.bash_aliases; fi
```