mirror of
https://github.com/acedanger/shell.git
synced 2025-12-05 22:50:18 -08:00
added google gemini cli to the setup process. github.com/google-gemini/gemini-cli
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
# dotfiles
|
||||
|
||||
My personal dotfiles and system setup configuration for Linux machines.
|
||||
@@ -129,9 +128,137 @@ The tests validate:
|
||||
|
||||
For more details on testing, see [Docker Bootstrap Testing Framework](../docs/docker-bootstrap-testing-framework.md).
|
||||
|
||||
## Manual Steps
|
||||
## Creating New Aliases
|
||||
|
||||
If you need to manually set up aliases:
|
||||
The system supports two types of aliases: **static aliases** (always available) and **dynamic aliases** (conditional based on installed tools).
|
||||
|
||||
### Static Aliases (Simple Commands)
|
||||
|
||||
For simple command shortcuts that don't require conditional logic:
|
||||
|
||||
1. **Edit the base aliases file**:
|
||||
```bash
|
||||
nano ~/shell/dotfiles/my-aliases.zsh.original
|
||||
```
|
||||
|
||||
2. **Add your alias** in the appropriate section:
|
||||
```bash
|
||||
# Example: Add a new Git alias
|
||||
alias gst="git status"
|
||||
|
||||
# Example: Add a system alias
|
||||
alias ll="ls -la"
|
||||
```
|
||||
|
||||
3. **Run the setup script** to regenerate aliases:
|
||||
```bash
|
||||
~/shell/setup/setup.sh
|
||||
```
|
||||
|
||||
4. **Reload your shell**:
|
||||
```bash
|
||||
source ~/.zshrc
|
||||
```
|
||||
|
||||
### Dynamic Aliases (Conditional)
|
||||
|
||||
For aliases that depend on whether a tool is installed:
|
||||
|
||||
1. **Edit the setup script**:
|
||||
```bash
|
||||
nano ~/shell/setup/setup.sh
|
||||
```
|
||||
|
||||
2. **Add your conditional alias** after the existing alias setup sections (around line 560):
|
||||
```bash
|
||||
# Set up your-tool alias if your-tool is available
|
||||
if command -v your-tool &> /dev/null; then
|
||||
echo -e "${YELLOW}Setting up your-tool alias...${NC}"
|
||||
echo "alias yt=\"your-tool\"" >> "$ALIASES_FILE"
|
||||
echo -e "${GREEN}Your-tool alias (yt) configured successfully!${NC}"
|
||||
else
|
||||
echo -e "${YELLOW}Your-tool not found. Skipping yt alias.${NC}"
|
||||
fi
|
||||
```
|
||||
|
||||
3. **Run the setup script**:
|
||||
```bash
|
||||
~/shell/setup/setup.sh
|
||||
```
|
||||
|
||||
### Alias Categories and Examples
|
||||
|
||||
#### 🔧 System Management
|
||||
```bash
|
||||
alias update="/home/acedanger/shell/update.sh"
|
||||
alias ll="ls -laFh --group-directories-first --color=auto"
|
||||
```
|
||||
|
||||
#### 🐳 Docker & Containers
|
||||
```bash
|
||||
alias dcdn="docker compose down"
|
||||
alias dcupd="docker compose up -d"
|
||||
alias lzd="lazydocker"
|
||||
alias lzg="lazygit" # Recently added
|
||||
```
|
||||
|
||||
#### 🎬 Media & Services
|
||||
```bash
|
||||
alias plex="/home/acedanger/shell/plex/plex.sh"
|
||||
alias px="/home/acedanger/shell/plex/plex.sh"
|
||||
```
|
||||
|
||||
#### 🔧 Development Tools
|
||||
```bash
|
||||
alias py="python3"
|
||||
alias gc="git commit"
|
||||
alias gcm="git commit -m"
|
||||
```
|
||||
|
||||
### Alias Organization Best Practices
|
||||
|
||||
1. **Use meaningful names**: Choose alias names that are intuitive and memorable
|
||||
- `lzg` for lazygit ✅
|
||||
- `x` for some obscure command ❌
|
||||
|
||||
2. **Group related aliases**: Keep similar functionality together
|
||||
- Docker commands: `dcdn`, `dcupd`, `lzd`
|
||||
- Git commands: `gc`, `gcm`, `gpull`, `gpush`
|
||||
|
||||
3. **Use emojis for sections**: Help organize and visualize alias categories
|
||||
```bash
|
||||
# 🐳 Docker Compose Shortcuts
|
||||
# 🎬 Plex Media Server Management
|
||||
# 🔧 System Management
|
||||
```
|
||||
|
||||
4. **Test before committing**: Always test new aliases to ensure they work correctly
|
||||
|
||||
5. **Document complex aliases**: Add comments for non-obvious functionality
|
||||
```bash
|
||||
# Opens Plex web interface in default browser
|
||||
alias plex-web="xdg-open http://localhost:32400/web"
|
||||
```
|
||||
|
||||
### Troubleshooting Aliases
|
||||
|
||||
**Alias not working after setup?**
|
||||
- Restart your terminal or run `source ~/.zshrc`
|
||||
- Check if the command exists: `which command-name`
|
||||
- Verify alias was created: `alias alias-name`
|
||||
|
||||
**Alias conflicts?**
|
||||
- Check for existing aliases: `alias | grep alias-name`
|
||||
- Use `unalias alias-name` to remove conflicting aliases
|
||||
|
||||
**Want to remove an alias?**
|
||||
1. Edit the source file (`my-aliases.zsh.original` or `setup.sh`)
|
||||
2. Run the setup script again
|
||||
3. Reload your shell
|
||||
|
||||
## Manual Symlink Setup
|
||||
|
||||
If you need to manually set up the aliases symlink:
|
||||
|
||||
```sh
|
||||
# Create new symlink
|
||||
|
||||
Reference in New Issue
Block a user