From 711f892ada70a71f3aae4d51128f01744e73c3ae Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 26 Apr 2026 14:27:11 +0000 Subject: [PATCH] docs: explain \$EDITOR variable and how to set it \$EDITOR is blank by default on many systems -- running it without setting it fails silently. Added a section before the git/gh instructions that explains what it is, how to check if it's set, how to set it for a session or permanently in .bashrc/.zshrc, and common editor options including VS Code with --wait. https://claude.ai/code/session_012eTokAaGiZo7aGt1T2W9BC --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index 9bacd89..fead6fb 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,39 @@ Look for any of these in the app's docs: ## Getting git and authenticating to GitHub +### Set your preferred editor first + +The setup steps below use `$EDITOR` to open config files. It's a standard +shell variable that points to whichever editor you like. If it isn't set, +running `$EDITOR somefile` fails because the shell tries to execute an empty +string. + +Check whether it's already set: + +```bash +echo $EDITOR # blank = not set +``` + +Set it for the current session, or make it permanent by adding the export +to `~/.bashrc` (bash) or `~/.zshrc` (zsh): + +```bash +# Pick one -- whatever you actually have installed: +export EDITOR=nano +export EDITOR=vim +export EDITOR=micro +export EDITOR="code --wait" # VS Code (the --wait keeps the terminal paused until you close the file) + +# Make it permanent: +echo 'export EDITOR=nano' >> ~/.bashrc && source ~/.bashrc +# or for zsh: +echo 'export EDITOR=nano' >> ~/.zshrc && source ~/.zshrc +``` + +Once set, `$EDITOR somefile` opens that file in your chosen editor every time. + +### Install git + If git isn't installed on the server yet: ```bash