Explain .bashrc code
Paste a .bashrc and Vibe explains what each line sets up for a new terminal: aliases, functions, PATH, history and what PS1 puts in your prompt.
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.
Vibe22 lines selected
Press Explain it for the sample, or paste your own code first.
What this .bashrc sample shows
- interactive shells
- bash reads ~/.bashrc each time it starts an interactive shell, the kind you type into.
$-holds the shell's options and has anionly when it's interactive, so a script that ransource ~/.bashrcstopped at that line: its next line still ran, buttype llsaidll: not found. - variables and PATH
exporthands a variable on to every program the shell starts, whileHISTSIZEandHISTCONTROLare settings for bash itself.PATHis the list of folders searched for a command, in order, so with$HOME/binput first,command -v hellofound thehelloscript in ~/bin.- aliases and functions
- An alias swaps a short word for a longer command:
type llreported thatllis aliased tols -lah. A function can take arguments, which an alias can't:mkcd a/bmade both folders and moved into them, sopwdprinted~/a/b. - the prompt
PS1is the prompt.\u,\hand\wstand for your user name, the computer's name and the current folder, and$(...)runs a command each time the prompt is drawn. In a repo on thefeature/loginbranch, the prompt ended in~/proj (feature/login)$.
Good to know
- Run with GNU bash 5.3.15 on a test home folder, so nothing touched a real ~/.bashrc. Changes reach new terminals; in an open one,
source ~/.bashrcreads the file again. - Aliases are for typing, not for scripts: a script that defined
alias ll="ls -lah"and then ranllstopped withll: command not found. Write a function when a script needs the shortcut. - The bash manual on the history lines:
erasedups"causes all previous lines matching the current line to be removed from the history list before that line is saved", and withhistappend"the history list is appended to the file named by the value of the HISTFILE variable when the shell exits, rather than overwriting the file."
Watch out: A login shell doesn't read ~/.bashrc. Started as bash -l, type ll printed ll: not found, because a login shell reads ~/.bash_profile instead. With [ -f ~/.bashrc ] && . ~/.bashrc in ~/.bash_profile, the same login shell had the alias.
Explain .bashrc 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