Skip to content

Instantly share code, notes, and snippets.

@ygit
Created February 17, 2026 17:39
Show Gist options
  • Select an option

  • Save ygit/d5c512e9fcc29eff4284641195fa4d77 to your computer and use it in GitHub Desktop.

Select an option

Save ygit/d5c512e9fcc29eff4284641195fa4d77 to your computer and use it in GitHub Desktop.
Shared Shell Environment, this file is read by all three shell - fish, zsh & bash
# ╔══════════════════════════════════════════════════════════════════╗
# ║ Shared Shell Environment ║
# ║ Single Source of Truth ║
# ╚══════════════════════════════════════════════════════════════════╝
#
# This file is read by all three shell configs on this Mac:
# - ~/.config/fish/config.fish (fish)
# - ~/.zshrc (zsh)
# - ~/.bashrc (bash)
#
# Each shell has its own reader that parses this file on startup.
# Shell-specific settings (version manager inits, completions, plugins)
# live in their respective config files, NOT here.
#
# ── Syntax ──────────────────────────────────────────────────────────
#
# PATH_ADD=<dir> Prepends <dir> to $PATH (duplicates are
# handled gracefully by each shell's reader).
#
# ALIAS=<name>=<cmd> Creates a shell alias. The first '=' after
# ALIAS separates the directive, the second '='
# separates the alias name from its command.
# Example: ALIAS=ll=ls -l
#
# KEY=value Sets an environment variable.
# Example: LC_ALL=en_US.UTF-8
#
# # comment Lines starting with '#' are ignored.
# (blank line) Blank lines are ignored.
#
# ── Variable expansion ──────────────────────────────────────────────
#
# $HOME is the only variable expanded — each shell's reader replaces
# it with the actual home directory at parse time.
# Use ~ in alias commands (expanded at runtime when the alias runs).
#
# ── How to add new entries ──────────────────────────────────────────
#
# 1. PATH: PATH_ADD=/opt/homebrew/opt/newtools/bin
# 2. ENV: MY_VAR=some_value
# 3. ALIAS: ALIAS=shortcut=cd ~/some/directory
#
# Changes take effect in new shell sessions (open a new terminal tab
# or run: exec fish / exec zsh / exec bash).
# ────────────────────────────────────────────────────────────────────
# ── Locale ──
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
# ── pyenv ──
PYENV_ROOT=$HOME/.pyenv
PATH_ADD=$HOME/.pyenv/bin
# ── nvm ──
NVM_DIR=$HOME/.nvm
# ── Google Cloud SDK ──
CLOUDSDK_PYTHON=$HOME/.pyenv/versions/3.12.12/bin/python3.12
# ── PATH ──
# Local binaries (claude CLI, pipx, etc.)
PATH_ADD=$HOME/.local/bin
# JetBrains Toolbox
PATH_ADD=$HOME/Library/Application Support/JetBrains/Toolbox/scripts
# ── Aliases ──
ALIAS=ll=ls -l
ALIAS=..=cd ..
ALIAS=please=sudo
ALIAS=now=date +%T
ALIAS=cl=curl -L
ALIAS=clean=rm -rf ~/Library/Developer/Xcode/DerivedData/
ALIAS=fast=bundle exec fastlane
ALIAS=stree=open /Applications/Sourcetree.app/ .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment