/shell_global

Bash and ZSH global aliases and general usage

Primary LanguageShell

Shell Globals

In an attempt to stay sane and have similar enough configs across the various computers I use this is intended to be a general top level list of generic aliases and functions.

Quick Setup

For use on a server or something where I just want to be able to feel at home
git clone https://github.com/andanao/dotfiles/tree/main
. ./shell_global/general.sh

Oneliner:

git clone https://github.com/andanao/dotfiles/tree/main && . ./shell_global/general.sh

Common Syntax

Within aliases.sh for common directories, or command I use the prefix jk to indicate commands that are frequently used. The infrequent use of jk and placement on the home row make it a wonderful leader combination for commands.

Setting Variables

Often (and unfortuantely) common directories aren’t where I might expect them (~~/git~ most commonly) so these are a list of variables where I can explicitly set paths to directories I commonly need to get to
git_dir = "/path/to/git/directory"
org_dir = "/path/to/org/directory"
emacs_dir = "/path/to/emacs/directory"
conf_dir = "/path/to/config/directory"

Common Directories and Variables

I’ve found one of the best uses for jk prefixes is to go to common directories as defined above
alias jkl="cd $git_dir"
alias jkgo="cd $org_dir"
alias jkge="cd $emacs_dir"
alias jkgc="cd $conf_dir"

Usage and Implementation

To simplify setup and get started execute general.sh which then calls aliases.sh and functions.sh

For the most part this gets implemented as a submodule as can be seen in my dotfiles for machines where I mantain dotfile configs