Skip to content

My Shell Prefs

Choose a tag to compare

@amantham20 amantham20 released this 13 Dec 15:02

Shell Shortlings v1.0.0

πŸŽ‰ First Release

Introducing Shell Shortlings - a collection of single-letter shell aliases to supercharge your command-line workflow!

           __
          / _)
   .-^^^-/ /
__/       /
<__.|_|-|_|

✨ What's New

  • Automatic Installation Script: One-command setup for Fish, Bash, and Zsh
  • Cross-Shell Support: Works seamlessly across different shells
  • Smart Command Detection: Aliases only activate if the underlying command exists
  • Platform Awareness: Automatic macOS-specific aliases

πŸš€ Quick Start

Option 1: Install with Script (Recommended)

# Download and install
curl -fsSL https://github.com/amantham20/my_shell/archive/refs/tags/v1.0.0.tar.gz | tar -xz
cd my_shell-1.0.0
./install.sh fish    # or bash, zsh

Option 2: Manual Installation

# Clone the repository
git clone --depth 1 --branch v1.0.0 https://github.com/amantham20/my_shell.git ~/.my_shell

# For Bash/Zsh - Add to ~/.bashrc or ~/.zshrc:
echo 'source ~/.my_shell/.shell_shortlings.sh' >> ~/.bashrc

# For Fish - Run the installer:
~/.my_shell/install.sh fish

πŸ“¦ What's Included

Core Aliases (26 shortcuts)

Alias Command Description
a git add -A Stage all changes
b cd .. Go back one directory
c clear Clear terminal
d docker Docker CLI (if installed)
e echo Echo text
f tail -f Follow file output
g git Git CLI
h history Command history
k kubectl Kubernetes CLI (if installed)
l ls -lrhta List files (detailed)
o open Open file/folder (macOS only)
p pwd Print working directory
q quit Quit
s ssh SSH client
t htop System monitor (if installed)
u sudo Run as superuser
v nvim/vim/vi Text editor (auto-detected)
w watch Watch command output (if installed)
x exit Exit terminal
y yarn Yarn package manager (if installed)
z cd - Return to previous directory

Additional Aliases

SLURM workload manager (if installed):

  • sc, sctrl β†’ scontrol
  • sb β†’ sbatch
  • sq β†’ squeue
  • sca β†’ scancel
  • si β†’ sinfo

systemd (if installed):

  • sy, systl β†’ systemctl

Helper Functions

  • cmd_exists <command> - Check if a command is available
  • run_if_exists <command> [args...] - Run a command only if it exists

πŸ› οΈ Technical Details

Installation Locations

  • Fish: ~/.config/fish/conf.d/shell_shortlings.fish
  • Bash: Appends source line to ~/.bashrc
  • Zsh: Appends source line to ~/.zshrc

Features

  • βœ… Automatic syntax conversion for Fish shell
  • βœ… Conditional alias loading (only if command exists)
  • βœ… Platform detection (macOS-specific aliases)
  • βœ… Priority-based editor selection (nvim β†’ vim β†’ vi)
  • βœ… No conflicts with existing configurations

πŸ“ Requirements

  • Bash 3.0+ / Zsh 5.0+ / Fish 3.0+
  • awk (for Fish conversion)
  • Git (optional, for cloning)

πŸ› Known Issues

None! This is the first stable release.

πŸ’‘ Usage Examples

# Stage all changes and commit
a && git commit -m "Update"

# Navigate quickly
b          # Go up one directory
z          # Return to previous directory

# Docker shortcuts
d ps       # List containers
d exec -it container_name bash

# Kubernetes shortcuts
k get pods
k logs -f pod-name

# Quick editing
v ~/.bashrc    # Opens in nvim/vim/vi

# System monitoring
t              # Launch htop
w "ls -l"      # Watch directory listing

🀝 Contributing

Found a bug or have a suggestion? Please open an issue or submit a pull request!

πŸ“„ License

MIT License

πŸ™ Credits

Created by Aman Dhruva Thamminana (@amantham20)


Enjoy your supercharged shell! πŸš€