Skip to content

Instantly share code, notes, and snippets.

@russellbits
Created August 28, 2025 17:07
Show Gist options
  • Save russellbits/fc9d2cb2bf17990889ce83cd86a2077d to your computer and use it in GitHub Desktop.
Save russellbits/fc9d2cb2bf17990889ce83cd86a2077d to your computer and use it in GitHub Desktop.
.zshrc
# ▄▖ ▗ ▄▖ ▗
# ▌ ▌▌▛▘▜▘▛▌▛▛▌ ▙▌▛▘▛▌▛▛▌▛▌▜▘
# ▙▖▙▌▄▌▐▖▙▌▌▌▌ ▌ ▌ ▙▌▌▌▌▙▌▐▖
# ▌
# Enhanced conditional command line with SSH detection:
autoload -U colors && colors
# Define a custom prompt function
function prompt_command {
# Check if we're in an SSH session
local ssh_prefix=""
if [[ -n "$SSH_CLIENT" || -n "$SSH_TTY" || -n "$SSH_CONNECTION" ]]; then
ssh_prefix="%F{cyan}ssh%f "
fi
if [ $? -eq 0 ]; then
PROMPT="${ssh_prefix}%F{green}^_^ Done, boss!%f %B${NEWLINE}\$%b "
else
PROMPT="${ssh_prefix}%F{202}O_O Doh! Now What!? %f %B${NEWLINE}\$%b "
fi
}
# Set the prompt command to run before each prompt
precmd_functions+=(prompt_command)
# Set the prompt to use the custom function
precmd_functions+=(prompt_command)
# General bin path
export PATH="/usr/local/bin:$PATH"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# ▖▖▗ ▘▜ ▘▗ ▘
# ▌▌▜▘▌▐ ▌▜▘▌█▌▛▘
# ▙▌▐▖▌▐▖▌▐▖▌▙▖▄▌
# Reload this zsh configuration
reload() {
source ~/.zshrc
print -P "%F{green}^_^ Interface reloaded, boss.%f"
}
# Jump to the TODO.txt file
gotodo() {
cd '/Users/russellwarner/Todo/'
code 'todo.txt'
print -P "%F{green}^_^ Opened todo.txt, boss.%f"
}
# Function to test colored output
colortest() {
print -P "%F{red}This is red text!%f"
print -P "%F{green}This is green text!%f"
print -P "%F{blue}This is blue text!%f"
print -P "%F{yellow}This is yellow text!%f"
print -P "%F{magenta}This is magenta text!%f"
print -P "%F{cyan}This is cyan text!%f"
print -P "%F{white}This is white text!%f"
}
# ▄▖▌ ▗ ▗
# ▚ ▛▌▛▌▛▘▜▘▛▘▌▌▜▘▛▘
# ▄▌▌▌▙▌▌ ▐▖▙▖▙▌▐▖▄▌
# run a generic python web server from this directory
alias preweb='python3 -m http.server 8000 && sleep 1 && open http://localhost:8000'
# icloud Operations
alias icloud='cd ~/Library/Mobile\ Documents/com~apple~CloudDocs/'
# alias for fuck help command
eval $(thefuck --alias)
# What is this?
eval "$(pyenv init --path)"
# CLI todo tool
alias todo="todo.sh"
# Is anyone using 2 still ;)
alias python="python3"
# The *only* markdown editor!
alias iaw='open -a "iA Writer"'
# This doesn't quite work
alias iawn='touch article.md && open -a "iA Writer" article.md'
# EVERYONE!
alias ls="ls -la"
# alias ruzeltest="npm run start"
## autocomplete
if [[ ! -o interactive ]]; then
return
fi
# ▄▖ ▌ ▄▖ ▗
# ▄▌▛▘▛▌ ▙▌▀▌▛▘▜▘▌▌
# ▄▌▌ ▙▌ ▌ █▌▌ ▐▖▙▌
# ▄▌
# Added by Windsurf
export PATH="/Users/russellwarner/.codeium/windsurf/bin:$PATH"
@russellbits
Copy link
Author

Just leaving this here in case anyone finds these functions and/or shortcuts helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment