As per usual with dotfile repos, this should be used more for inspiration rather than ran as-is (unless you are me).
Although I try to write cross-shell-compatible code, I tend to prioritize zsh
over other shells, since that is my daily-driver.
The most frequent places where I might have accidentally hard-coded a zsh-ism into my scripts are with array usage (since zsh uses a different starting index), parameter expansion (zsh has a bunch of unique options), and shell options (like word-splitting and glob expansion), since those by definition differ across shells.
I try to avoid implicit dependencies with shell scripting when possible, but sometimes it is unavoidable.
As of right now, the most frequently used dependencies would be:
- fzf
- Some sort of clipboard manager (which is only an issue on Linux distros where it is not bundled with it):
- macOS:
pbcopy
/pbpaste
- Linux, X:
xclip
- Linux, Wayland:
wl-copy
/wl-paste
- macOS:
- Node.js
- Python
These dependencies are optional (there are either fallbacks coded, or only a few utils use them), but are recommended:
- pandoc (for HTML and markdown conversion, etc.)
asdf
(for various runtime / package management)
Run ./manage.sh push
to copy files out of this repo.
Run ./manage.sh pull
to pull local settings into this repo.
Secret values should not be stored anywhere other than a secure password manager.
You can read values out of 1Password in the following ways:
op read "op://Private/${ITEM_NAME_OR_ID}/${FIELD_NAME}"
# ^ If the item name contains special characters (like `(`)
# then 1Password will autogenerate a unique ID for it instead
# of using the name
# Or, you can query by the item name, regardless if it was
# auto-replaced with a unique ID
op item get ${ITEM_NAME} --vault Private --fields label=${FIELD_NAME}
# ^ Both `--vault` and `--fields` are optional, but wise to
# include for scoping
- My dotfiles cheatsheet
- My Bash / Shell Scripting Cheatsheet
- On Linux, ZSH completions should be under
/usr/share/zsh/functions/Completion/Unix/
. On macOS, they are under/usr/share/zsh/${version}/functions
- To explore with VS Code:
code "/usr/share/zsh/$ZSH_VERSION/functions"
- To explore with VS Code: