This repo provides a collection of helpful custom aliases and functions for the ZSH shell and Oh My Zsh, including:
- File system navigation
- Network operations
- System maintenance
- Homebrew helpers
- Development workflows
It also creates a framework to add new custom functions and aliases (_add_function, _add_alias) with built-in documentation (function_info, alias_info), and plays nicely with the global namespace.
Clone into custom directory:
git clone https://github.com/dnstock/zsh-dotfiles.git ~/.oh-my-zsh/custom/Though Oh My Zsh is preferred, you can also clone and source in your .zshrc:
git clone https://github.com/dnstock/zsh-dotfiles.git
echo "source ./zsh-dotfiles/*.zsh" >> ~/.zshrcThe scripts should function correctly with minor modifications:
- Replace
typesetwithdeclare(for Bash) - Adjust code blocks marked Zsh-specific
- Adjust array syntax where needed
LSD is optional. If installed, it will be used to further enhance file listing.
brew install lsdAn lsd_config.yaml file can be used to manage configuration from within this repository.
Create a configuration file from the included example file:
cp lsd_config.example.yaml lsd_config.yaml
When LSD is detected, this configuration will be automatically symlinked to ~/.config/lsd/config.yaml.
If an existing configuration is detected, it will not be overwritten. Please delete the existing config.yaml file if you prefer to use lsd_config.yaml.
View available aliases or function:
alias_info --help
function_info --helpView all aliases or functions:
alias_info --all
function_info --allView specific alias or functions:
alias_info netinfo
function_info find_procll # Enhanced directory listing
netinfo # Show network interface details
tree # Display directory structure
.
├── 0_init.zsh # Core declarations
├── 1_aliases.zsh # General aliases
├── 2_functions.zsh # General functions
├── lsd_config.yaml # LSD configuration (optional)
├── [...] # Scope-specific scripts
└── zz_end.zsh # Clean up and summarize
Script files get processed in alphabetical order.
Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -am 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.