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
This commit is contained in:
@@ -115,6 +115,39 @@ Look for any of these in the app's docs:
|
|||||||
|
|
||||||
## Getting git and authenticating to GitHub
|
## 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:
|
If git isn't installed on the server yet:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
Reference in New Issue
Block a user