Explain .zshrc code
Paste a .zshrc and Vibe explains what each line sets up in a new terminal: history options, path, completion, aliases, functions and what the % codes in PROMPT show.
Up to 1,500 characters (about 60 lines). Your code is sent to Unvibe and Anthropic to write the explanation. Don't paste keys or passwords. Common key formats are refused.
Vibe25 lines selected
Press Explain it for the sample, or paste your own code first.
What this .zshrc sample shows
- when it runs
- zsh reads ~/.zshrc each time it starts an interactive shell, a terminal you type into, and that includes a login shell:
zsh -l -ihad thellalias too. A script run withzsh -cdoesn't read it: therewhence -v llsaidll not found. bash ignores the file completely. - history and options
HISTSIZEis how many commands a session keeps in memory andSAVEHISThow many the history file keeps. WithSHARE_HISTORYon, each command is written toHISTFILEas you type it, so every open terminal sees the others' commands, andHIST_IGNORE_DUPSskips a command typed twice in a row.setoptlisted both assharehistoryandhistignoredups.- path and typeset -U
- In zsh, the array
pathand the textPATHare the same list, sopath=(~/bin $path)puts ~/bin first, andcommand -v hellofound thehelloscript there.typeset -U pathkeeps each folder once: after adding ~/bin again and re-reading the file, it was still listed 1 time. Without that line, two re-reads left it listed 3 times. - aliases, functions and the prompt
whence -v llprintedll is an alias for ls -lah, andmkcd a/bmade both folders and moved into them. InPROMPT,%F{blue}and%fstart and stop the color,%~is the folder with your home shown as~and%#is%for you or#for root: in ~/proj the prompt read~/proj %with the folder in blue.
Good to know
- Run with zsh 5.9.2 on a test home folder, so nothing touched a real ~/.zshrc.
compinitwrote its cache, a.zcompdumpfile, into that folder on the first run. - zsh doesn't split a variable on spaces the way bash does: with
f="my file.txt",set -- $fgave 1 argument in zsh and 2 in bash. Code copied from a bash script can behave differently here. - zsh arrays start at 1, not 0: with
a=(x y z),${a[1]}wasx.
Watch out: Settings that scripts need don't belong in .zshrc. A script run as zsh -c saw none of it: ll not found, ~/bin wasn't on its path and command -v hello found nothing. A variable exported in ~/.zshenv, which zsh reads for every shell, reached the same script: it printed SHOP_ENV=[dev].
Explain .zshrc code beside your editor
Unvibe is a free app for Mac and Windows. In the app there is no pasting: select code in any app and press Control+U (Ctrl+Alt+U on Windows).
Install on Mac
curl -fsSL https://unvibe.site/install.sh | bashPaste into Terminal. Unvibe isn't notarized by Apple yet, so this is the smooth path.
Or download the .dmg · Intel Mac build · SHA-256 checksums
Opening the .dmg the first time
- Open the .dmg and drag Unvibe to Applications.
- Open it once; macOS says it can't verify it. Click Done.

Real screen, macOS 15 - System Settings › Privacy & Security › Open Anyway. Confirm, then enter your Mac password. The button shows for about an hour after you try to open Unvibe.

Real screen, macOS 15
The Terminal line checks the download against the published SHA-256 and Unvibe's self-signed signature before it installs anything. More help with the first open