55 lines
1.5 KiB
Markdown
55 lines
1.5 KiB
Markdown
# Shell Aliases
|
|
|
|
Reusable Bash/Zsh aliases for common shell, git, tmux, directory, and listing shortcuts.
|
|
|
|
## Install
|
|
|
|
Run the installer:
|
|
|
|
```bash
|
|
/Users/saravana/BytelystAI/bytelyst-devops-tools/aliases/install.sh
|
|
```
|
|
|
|
The installer detects macOS/Linux and Bash/Zsh, then adds a managed source block to the right startup file. It is safe to run more than once and creates a timestamped backup before changing the startup file.
|
|
|
|
Preview the change without writing files:
|
|
|
|
```bash
|
|
/Users/saravana/BytelystAI/bytelyst-devops-tools/aliases/install.sh --dry-run
|
|
```
|
|
|
|
You can also source the aggregate loader manually.
|
|
|
|
For Zsh, add this to `~/.zshrc`:
|
|
|
|
```bash
|
|
source /Users/saravana/BytelystAI/bytelyst-devops-tools/aliases/_source_all.alias
|
|
```
|
|
|
|
For Bash, add this to `~/.bashrc`:
|
|
|
|
```bash
|
|
source /Users/saravana/BytelystAI/bytelyst-devops-tools/aliases/_source_all.alias
|
|
```
|
|
|
|
The loader can be sourced from any directory. It discovers the `aliases/` folder and loads each alias file from that path.
|
|
|
|
## Requirements
|
|
|
|
- Supported shells: Bash and Zsh
|
|
- Optional commands used by aliases: `git`, `tmux`, `tree`, and `vim` or `$EDITOR`
|
|
|
|
## Examples
|
|
|
|
```bash
|
|
gs # git status
|
|
gd # git diff
|
|
tl # tmux list-sessions
|
|
tn work # tmux new-session -s work
|
|
ta work # tmux attach-session -t work
|
|
```
|
|
|
|
## Local Aliases
|
|
|
|
Keep machine- or org-specific shortcuts out of the portable default files. Start from `_local.example.alias` if you want private local aliases such as branch-specific git commands.
|