This repo is designed to quickly implement an intelligent standard zsh configuration. In its default settings, it relies on zsh4humans.
Alternatively, alter the install script to use zshrc
and zshenv
which relies on
zcomet for more granular control of your zsh environment.
As these are not daily-driven, they are likely rough around the edges. For further reference, see minimal zcomet config
Rosetta emulation inherent in the z4hrc assumes/requires
direnv
is installed in both native and emulated environments! ref
The install script (below) will autoinstall the default configuration:
- clone this repo to
~/_sysconfig
(or configured location)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/ahgraber/sysconfig/HEAD/bootstrap/install.sh)"
Use task
to complete setup:
- brew
- pipx
- nix
- mac setup/configuration
-
Set up your
.gitconfig
. Refer to gitconfiggit config --global user.name "Your Name" git config --global user.email "youremail@yourdomain.com" # https://leosiddle.com/posts/2020/07/git-config-pull-rebase-autostash/ git config --global pull.rebase true git config --global rebase.autoStash true # git config --global credential.helper osxkeychain
Git configuration (
~/.gitconfig
and~/.gitattributes_global
) are copies (not symlinks) so they will not be synced if you update the git repository
- zsh guide
- completion utilities
- zcomet
- Benchmarks & conclusions
- zsh configuration
- completion configuration and blog
- zstyle examples
Review ~/.aliases
for an understanding of available functionality and remapping (bat
→ cat
; exa
→ ls
)
~/.aliases
is synced to the git repo. For local configuration, use~/.aliases.local
icon | keybind | description |
---|---|---|
^ + c |
ctrl + c |
break/exit |
➡ |
tab |
show available completions |
➡➡ |
tab + tab |
enter completion menu |
⌥ + ← |
opt + left |
move the cursor one word left (including in completions) |
⌥ + → |
opt + right |
move the cursor one word right (including in completions) |
^ + w |
ctrl + w |
cut/delete prior word |
^ + u |
ctrl + u |
cut/delete entire line |
^ + y |
ctrl + y |
paste |
^ + _ |
ctrl + - |
undo |
hint: run
bindkey
to see defaults
direnv allows un/loading a unique set of environmental variables depending on the current directory.
-
Navigate to working directory where
.envrc
exists that you would like to load -
To allow access (both read and modify) to
.envrc
, rundirenv allow .
"Specifying whitelist directives marks specific directory hierarchies or specific directories as "trusted" – direnv will evaluate any matching .envrc files regardless of whether they have been specifically allowed. This feature should be used with great care, as anyone with the ability to write files to that directory (including collaborators on VCS repositories) will be able to execute arbitrary code on your computer."
cat <<EOF > $HOME/.config/direnv/direnv.toml
[whitelist]
prefix = [ "$HOME/GitHub" ]) # whitelist `GitHub` dir
EOF
task is a task runner / build tool that provides
a simple command line interface to logical tasks, defined as bash commands in taskfile.yaml
.