Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

Document the Shell, Git, SSH, and Tools tabs

Țugui Dragoș8b31e8f10fde
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md
index 51d5f26d..f069b938 100644
--- a/ARCHITECTURE.md
+++ b/ARCHITECTURE.md
@@ -170,11 +170,19 @@ macOS asks the user to approve it once. It talks to the app over XPC.
languages. The key is the English, so changing a sentence means translating it again; the tests fail until
every language has it. PeelCore never translates: it returns plain English, and the app turns known
sentences into the reader's language (`FixedSentence`).
-- **Terminal.** The Terminal page writes only Terminal's own preferences: Peel's themes as profiles of their own,
- each built by `TerminalProfile` from Apple's Clear Dark, the profile Terminal opens with, and two keys in the Peel
- theme in use (`TerminalOption`). `TerminalThemeLedger` keeps what Terminal used before and the fingerprint of each
- profile Peel wrote, so Put Back takes away only a profile still as Peel wrote it. Peel writes only while Terminal is
- closed: an open Terminal does not read a change made outside it, and writes its own settings over it.
+- **Terminal.** The Terminal page writes Terminal's own preferences: Peel's themes as profiles of their own, each
+ built by `TerminalProfile` from Apple's Clear Dark, the profile Terminal opens with, and two keys in the Peel theme
+ in use (`TerminalOption`). `TerminalThemeLedger` keeps what Terminal used before and the fingerprint of each profile
+ Peel wrote, so Put Back takes away only a profile still as Peel wrote it. Peel writes only while Terminal is
+ closed: an open Terminal does not read a change made outside it, and writes its own settings over it. The Shell
+ and SSH tabs write only files of Peel's own in its folder, `Terminal/zshrc` (`ShellFile`, with the prompt from
+ `PromptStyle`) and `Terminal/ssh_config` (`SSHFile`), which zsh and ssh read through lines the person adds: Peel
+ never edits `~/.zshrc` or `~/.ssh/config`. The Git tab changes Git's settings only through `git config --global`
+ (`GitConfig`), and `GitLedger` keeps what each key held, so turning a setting off puts it back. A setting is
+ offered only when the tool on the Mac knows it: zsh lists its options and functions (`ZshRequirements`), Git its
+ keys (`git help --config`), and ssh accepts the options on its own command line. The Tools tab installs nothing:
+ `TerminalTool` gives each tool's Homebrew formulae and the lines its documentation gives, and Homebrew is asked
+ whether it still offers them.
- **Watching the Trash.** `TrashMonitor` notices an app the user moves to the Trash: the home's, and the Trash of
each other disk Peel lists apps on (`VolumeTrashes`), where an app thrown away from that disk lands. `TrashService`
tells it about Peel's own moves (`OwnTrashMoves`), by where each item landed, so Peel never offers to clean up
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8f96b364..0a53a2c6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -19,6 +19,8 @@ The first public release, for macOS 26 and later, on Apple silicon and Intel Mac
needs Rosetta.
- Changes settings macOS has but doesn't show, and puts back what was there when you turn one off.
- Gives Terminal one of 29 dark themes built on Apple's Clear Dark, and puts back the profile it used before.
+- Sets up the command line from the same page: choose a prompt, turn on settings that zsh, Git, and ssh already
+ have, and copy the Homebrew commands for command-line tools worth having, with the lines each one needs.
- Moves what it removes to the Trash instead of deleting it, and keeps a History that puts it back and lists
what it didn't move, with the reason.
- Keeps what you select on the pages that free space while you look at the others, and moves it all at once, as
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/TerminalThemeTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/TerminalThemeTests.swift
index 963c44da..823bb05b 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/TerminalThemeTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/TerminalThemeTests.swift
@@ -48,6 +48,29 @@ struct TerminalThemeTests {
}
}
+ @Test func terminalMDShowsEveryLinePeelWritesAndEveryPromptAndTool() throws {
+ let page = try String(contentsOf: StringCatalogTests.repository.appending(path: "TERMINAL.md"), encoding: .utf8)
+ let folder = StringCatalogTests.repository.appending(path: "Terminal/Prompts", directoryHint: .isDirectory)
+ let pictures = try FileManager.default.contentsOfDirectory(atPath: folder.path).filter { $0.hasSuffix(".png") }
+ #expect(Set(pictures) == Set(PromptStyle.allCases.map { "\($0).png" }))
+ let homebrew = URL(filePath: "/opt/homebrew", directoryHint: .isDirectory)
+ var lines = ShellSetting.allCases.flatMap(\.lines) + [ShellFile.completionSystem] + PromptStyle.allCases.flatMap(\.lines)
+ lines += GitSetting.allCases.filter { $0 != .signCommits }.flatMap { $0.values(signingKey: nil) }.map { "git config --global \($0.key) \($0.value)" }
+ lines += ["git config --global gpg.format ssh", "git config --global commit.gpgSign true"]
+ lines += SSHSetting.allCases.flatMap(\.lines)
+ lines += TerminalTool.allCases.flatMap { $0.setup(prefix: homebrew) }.flatMap(\.lines).map { $0.replacing("/opt/homebrew", with: "$HOMEBREW_PREFIX") }
+ let pageLines = Set(page.split(separator: "\n").map { $0.trimmingCharacters(in: .whitespaces) })
+ for line in lines {
+ #expect(pageLines.contains(line), "\(line)")
+ }
+ for tool in TerminalTool.allCases {
+ #expect(page.contains("`\(tool.installCommand)`"), "\(tool)")
+ }
+ for style in PromptStyle.allCases {
+ #expect(page.contains("Terminal/Prompts/\(style).png"), "\(style)")
+ }
+ }
+
static func expectColors(of theme: TerminalTheme, in profile: [String: Any]) throws {
let colors = [
("BackgroundColor", theme.background), ("TextColor", theme.text), ("TextBoldColor", theme.text),
diff --git a/Peel/TerminalExport.swift b/Peel/TerminalExport.swift
index 6fc8bd55..86351ac1 100644
--- a/Peel/TerminalExport.swift
+++ b/Peel/TerminalExport.swift
@@ -8,14 +8,22 @@ enum TerminalExport {
guard let directory = ProcessInfo.processInfo.environment["PEEL_TERMINAL_EXPORT"] else { return }
let themes = URL(filePath: directory).appending(path: "Themes", directoryHint: .isDirectory)
let renders = URL(filePath: directory).appending(path: "Renders", directoryHint: .isDirectory)
+ let prompts = URL(filePath: directory).appending(path: "Prompts", directoryHint: .isDirectory)
do {
try FileManager.default.createDirectory(at: themes, withIntermediateDirectories: true)
try FileManager.default.createDirectory(at: renders, withIntermediateDirectories: true)
+ try FileManager.default.createDirectory(at: prompts, withIntermediateDirectories: true)
for theme in TerminalThemeCatalog.all {
let profile = try PropertyListSerialization.data(fromPropertyList: TerminalProfile.settings(for: theme), format: .xml, options: 0)
try profile.write(to: themes.appending(path: "\(theme.profileName).terminal"))
try render(TerminalSession(theme: theme).frame(width: 300), to: renders.appending(path: "\(theme.name).png"))
}
+ let theme = TerminalThemeCatalog.all.first { $0.name == "Hadal" }
+ let width = PromptSample.width(of: PromptStyle.allCases, user: "you", host: "Mac")
+ for style in PromptStyle.allCases {
+ let sample = PromptSample(style: style, theme: theme, width: width, user: "you", host: "Mac")
+ try render(sample, to: prompts.appending(path: "\(style).png"))
+ }
} catch {
print("Terminal export failed: \(error)")
}
diff --git a/README.md b/README.md
index 6aaf9e05..09b596ad 100644
--- a/README.md
+++ b/README.md
@@ -167,7 +167,7 @@ every file extension in Finder, keep straight quotes as you type, drag a window
seconds on the menu bar clock. Each tweak says what it changes, and turning it off puts back what was there
before, or leaves it to macOS.
-### Give Terminal a theme
+### Set up Terminal
<p align="center">
<img src="Terminal/Renders/Hadal.png" width="49%" alt="The Hadal theme in Terminal">
@@ -176,8 +176,14 @@ before, or leaves it to macOS.
Peel comes with 29 dark themes for Terminal, built on Apple's own Clear Dark. Choose one, and Terminal opens with it
in every new window; Put Back gives Terminal its own profile again. The same page can leave out the "Last login"
-line, make Option the Meta key, and silence the bell. [TERMINAL.md](TERMINAL.md) shows every theme, each with its
-file for Terminal on a Mac without Peel.
+line, make Option the Meta key, and silence the bell.
+
+It sets up the command line as well. Choose a prompt, or keep the one macOS sets, and turn on settings zsh, Git, and
+ssh already have, each with a switch: a longer history shared between windows, Up and Down that find what you started
+typing, Tab completion with a menu, rebase when pulling, and connections that stay alive. Peel writes them to files of
+its own, which zsh and ssh read through a line you add, and changes Git's with `git config`, so Turn All Off puts
+everything back. The Tools tab suggests command-line tools worth having, with the Homebrew command and the lines to
+add. [TERMINAL.md](TERMINAL.md) shows every theme and every setting, with what each one writes.
### Stay in control
@@ -409,6 +415,10 @@ its helper and its login item, moves itself, the files that are certainly its ow
Support to the Trash, clears its settings, and quits. That
folder holds History, your exclusions, and the settings Peel saved when you reset an app.
+What Peel changed for you stays as it is: tweaks, Terminal's theme, and Git's settings. Turn them off first if you
+want them gone. The shell and ssh settings live in Peel's folder, so they go with it, and the line you added to
+`~/.zshrc` and the two at the end of `~/.ssh/config` then do nothing. You can delete them.
+
If you installed Peel with Homebrew, Settings shows this command in its place, with a button that copies it. Run it
in Terminal: Homebrew takes Peel off its list of what is installed, deletes the app rather than moving it to the
Trash, and moves Peel's files to the Trash.
diff --git a/SAFETY.md b/SAFETY.md
index c6af6e3a..506fdedd 100644
--- a/SAFETY.md
+++ b/SAFETY.md
@@ -3,7 +3,8 @@
Peel removes files. So the question that matters most isn't whether someone can break in. It is **whether Peel can
take something you can't get back**, and this page answers it: what Peel never removes, what it never deletes, what
it selects for you and what it leaves to you, how it keeps crypto wallets, how a reset stays within an app's
-settings, what it changes in Terminal's settings, and what its helper, which runs as root, may do.
+settings, what it changes in Terminal's, the shell's, Git's, and ssh's settings, and what its helper, which runs as
+root, may do.
To report a way around any of this, see [SECURITY.md](SECURITY.md).
@@ -283,6 +284,12 @@ Leaving out the "Last login" line makes an empty `~/.hushlogin`, the file `login
moves that file to the Trash, recorded in History. Peel never edits your shell's files: to stop the shell from saving
its sessions, it shows the line to add yourself.
+The Shell and SSH tabs write only two files of Peel's own, in its folder. zsh and ssh read them only through the line
+you add to `~/.zshrc` and the two lines you add at the end of `~/.ssh/config`, and Peel never edits those files. Turn
+All Off empties Peel's files, and a line left in yours then does nothing. The Git tab changes Git's settings only with
+`git config --global`, Git's own command, after noting what each key held: turning a setting off puts that back, and
+a value you changed since is left as it is. The Tools tab installs nothing: it shows the commands to copy.
+
## The helper that runs as root
Peel installs a helper for the few things that need administrator rights: moving items in the folders it serves
diff --git a/TERMINAL.md b/TERMINAL.md
index 4ee02c79..8b7b0bb6 100644
--- a/TERMINAL.md
+++ b/TERMINAL.md
@@ -1,31 +1,40 @@
-# Terminal themes
+# Terminal
-Peel comes with 29 dark themes for Terminal. Each one is a Terminal profile built on Apple's own Clear Dark: the
-same font and window, with colors of its own, each checked for contrast against its background.
+Peel's Terminal page gives Terminal a theme and sets up the command line around it, on six tabs:
+
+- **Themes**: 29 dark themes, each a Terminal profile built on Apple's own Clear Dark.
+- **Terminal**: how Terminal opens, and the theme in use.
+- **Shell**, **Git**, and **SSH**: settings zsh, Git, and ssh already have, from their own manuals, each with a switch.
+- **Tools**: command-line tools worth having, with the commands that install them and set them up.
<p align="center">
<img src="Terminal/Renders/Hadal.png" width="49%" alt="The Hadal theme in Terminal">
<img src="Terminal/Renders/Noctiluca.png" width="49%" alt="The Noctiluca theme in Terminal">
</p>
-## With Peel
+## Themes
+
+Each theme is a Terminal profile built on Apple's own Clear Dark: the same font and window, with colors of its own,
+each checked for contrast against its background.
+
+### With Peel
Choose Terminal in Peel's sidebar, then choose a theme. Terminal opens with it and uses it in every new window, and
Put Back gives Terminal the profile it had before. Peel changes Terminal's settings only while Terminal is closed,
and offers to quit it first.
-The Settings tab of the same page can also leave out the "Last login" line in new windows, keep Terminal from
+The Terminal tab of the same page can also leave out the "Last login" line in new windows, keep Terminal from
reopening its windows, make Option the Meta key and silence the bell in the theme you use, and show the line that
stops the shell from saving its sessions, with a Copy button. Peel never edits your shell's files.
-## Without Peel
+### Without Peel
Download a theme below. In Terminal, choose Terminal > Settings, click Profiles, and drag the file into the list of
profiles, or click the Action pop-up menu and choose Import. Select the theme and click Default to open every new
window with it. Apple describes the steps in
[Import and export Terminal profiles on Mac](https://support.apple.com/guide/terminal/import-and-export-terminal-profiles-trml4299c696/mac).
-## The themes
+### The themes
<table>
<tr>
@@ -90,6 +99,412 @@ window with it. Apple describes the steps in
</tr>
</table>
+## Shell, Git, and SSH
+
+Every setting on these tabs is one that zsh, Git, or ssh already has, and each has a switch. Peel never edits your
+own files:
+
+- **zsh** reads Peel's settings from a file of Peel's own, `~/Library/Application Support/Peel/Terminal/zshrc`, once
+ you add one line to `~/.zshrc`, above the lines that load other tools. The Shell tab gives a command that adds it.
+- **ssh** reads them from `~/Library/Application Support/Peel/Terminal/ssh_config`, once you add two lines at the end
+ of `~/.ssh/config`. What you set for a server earlier in that file stays in force, since ssh uses the first value
+ it finds.
+- **Git**'s are changed with `git config --global`, Git's own command, and turning one off puts back what you had.
+
+Peel offers a setting only when the zsh, Git, or ssh on your Mac knows it, and Turn All Off on each tab undoes what
+Peel set there. Without Peel, add the lines below to `~/.zshrc` or `~/.ssh/config` yourself, or run the `git config`
+commands.
+
+### Prompt
+
+Five prompts beside the one macOS sets, which Peel leaves as it is. The colors are the Terminal theme's, and the
+arrow turns red after a command that fails. The branch comes from zsh's own
+[vcs_info](https://zsh.sourceforge.io/Doc/Release/User-Contributions.html#Version-Control-Information).
+
+<table>
+ <tr>
+ <td width="45%"><img src="Terminal/Prompts/macOS.png" alt="The macOS prompt"></td>
+ <td><b>macOS</b><br>The prompt macOS sets: your name, the computer, and the folder you're in. Peel writes nothing.</td>
+ </tr>
+ <tr>
+ <td width="45%"><img src="Terminal/Prompts/arrow.png" alt="The Arrow prompt"></td>
+ <td><b>Arrow</b><br>The folder you're in, then an arrow that turns red after a command fails.</td>
+ </tr>
+ <tr>
+ <td width="45%"><img src="Terminal/Prompts/arrowAndBranch.png" alt="The Arrow and Branch prompt"></td>
+ <td><b>Arrow and Branch</b><br>The folder and, in a Git repository, its branch, then the arrow.</td>
+ </tr>
+ <tr>
+ <td width="45%"><img src="Terminal/Prompts/twoLines.png" alt="The Two Lines prompt"></td>
+ <td><b>Two Lines</b><br>The folder and branch on one line and the arrow on the next, so the command always has the whole line.</td>
+ </tr>
+ <tr>
+ <td width="45%"><img src="Terminal/Prompts/folderOnly.png" alt="The Folder Only prompt"></td>
+ <td><b>Folder Only</b><br>Only the name of the folder you're in, then the arrow.</td>
+ </tr>
+ <tr>
+ <td width="45%"><img src="Terminal/Prompts/classic.png" alt="The Classic prompt"></td>
+ <td><b>Classic</b><br>Your name, the computer, and the folder, in color.</td>
+ </tr>
+</table>
+
+The lines each prompt adds:
+
+**Arrow**
+
+```zsh
+PROMPT='%F{cyan}%~%f %(?.%F{green}.%F{red})❯%f '
+```
+
+**Arrow and Branch**
+
+```zsh
+autoload -Uz vcs_info add-zsh-hook
+zstyle ':vcs_info:*' enable git
+zstyle ':vcs_info:git:*' formats ' %F{yellow}%b%f'
+zstyle ':vcs_info:git:*' actionformats ' %F{yellow}%b%f %F{red}%a%f'
+add-zsh-hook precmd vcs_info
+setopt PROMPT_SUBST
+PROMPT='%F{cyan}%~%f${vcs_info_msg_0_} %(?.%F{green}.%F{red})❯%f '
+```
+
+**Two Lines**
+
+```zsh
+autoload -Uz vcs_info add-zsh-hook
+zstyle ':vcs_info:*' enable git
+zstyle ':vcs_info:git:*' formats ' %F{yellow}%b%f'
+zstyle ':vcs_info:git:*' actionformats ' %F{yellow}%b%f %F{red}%a%f'
+add-zsh-hook precmd vcs_info
+setopt PROMPT_SUBST
+PROMPT=$'%F{cyan}%~%f${vcs_info_msg_0_}\n%(?.%F{green}.%F{red})❯%f '
+```
+
+**Folder Only**
+
+```zsh
+PROMPT='%F{cyan}%1~%f %(?.%F{green}.%F{red})❯%f '
+```
+
+**Classic**
+
+```zsh
+PROMPT='%F{green}%n@%m%f %F{blue}%~%f %# '
+```
+
+### Shell
+
+**History**
+
+| Setting | What it does |
+| --- | --- |
+| [Remember 50,000 commands](https://zsh.sourceforge.io/Doc/Release/Parameters.html#index-HISTSIZE) | zsh keeps your last 50,000 commands and saves all of them, instead of keeping 2,000 and saving 1,000 as macOS sets it. |
+| [Share history between windows](https://zsh.sourceforge.io/Doc/Release/Options.html#index-SHARE_005fHISTORY) | Each window adds its commands to the history as they run and reads the others', so the Up Arrow finds them in every window. |
+| [Save when each command ran](https://zsh.sourceforge.io/Doc/Release/Options.html#index-EXTENDED_005fHISTORY) | Each command is saved with the time it started and how long it ran, which `history -iD` shows. |
+| [Skip repeated commands](https://zsh.sourceforge.io/Doc/Release/Options.html#index-HIST_005fIGNORE_005fALL_005fDUPS) | When you run a command that is already in the history, the older copy goes, so each command appears once. |
+| [Leave out commands that start with a space](https://zsh.sourceforge.io/Doc/Release/Options.html#index-HIST_005fIGNORE_005fSPACE) | A command typed after a space isn't saved, which keeps a password or token you type out of the history. |
+| [Remove extra spaces](https://zsh.sourceforge.io/Doc/Release/Options.html#index-HIST_005fREDUCE_005fBLANKS) | Spaces a command doesn't need are taken out before it is saved. |
+| [Check recalled commands first](https://zsh.sourceforge.io/Doc/Release/Options.html#index-HIST_005fVERIFY) | `!!` and the other history shortcuts put the command on the line for you to check, instead of running it at once. |
+| [Lock the history file safely](https://zsh.sourceforge.io/Doc/Release/Options.html#index-HIST_005fFCNTL_005fLOCK) | Saving the history locks the file the system's way, so windows that save at the same time don't damage it. |
+
+```zsh
+# Remember 50,000 commands
+HISTSIZE=50000
+SAVEHIST=50000
+
+# Share history between windows
+setopt SHARE_HISTORY
+
+# Save when each command ran
+setopt EXTENDED_HISTORY
+
+# Skip repeated commands
+setopt HIST_IGNORE_ALL_DUPS
+
+# Leave out commands that start with a space
+setopt HIST_IGNORE_SPACE
+
+# Remove extra spaces
+setopt HIST_REDUCE_BLANKS
+
+# Check recalled commands first
+setopt HIST_VERIFY
+
+# Lock the history file safely
+setopt HIST_FCNTL_LOCK
+```
+
+**Typing**
+
+| Setting | What it does |
+| --- | --- |
+| [Allow comments in commands](https://zsh.sourceforge.io/Doc/Release/Options.html#index-INTERACTIVE_005fCOMMENTS) | Anything after `#` on the command line is a comment, as in a script, so a pasted command with comments runs. |
+| [Search history with the arrow keys](https://zsh.sourceforge.io/Doc/Release/User-Contributions.html#index-up_002dline_002dor_002dbeginning_002dsearch) | Type the start of a command, and the Up Arrow and Down Arrow go only through the commands that start that way, whichever of its two sequences an arrow key sends. |
+| [Delete paths one folder at a time](https://zsh.sourceforge.io/Doc/Release/Parameters.html#index-WORDCHARS) | Deleting a word back stops at each slash, so a path goes one folder at a time. |
+
+```zsh
+# Allow comments in commands
+setopt INTERACTIVE_COMMENTS
+
+# Search history with the arrow keys
+autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
+zle -N up-line-or-beginning-search
+zle -N down-line-or-beginning-search
+bindkey '^[[A' up-line-or-beginning-search
+bindkey '^[OA' up-line-or-beginning-search
+bindkey '^[[B' down-line-or-beginning-search
+bindkey '^[OB' down-line-or-beginning-search
+
+# Delete paths one folder at a time
+WORDCHARS=${WORDCHARS//[\/]}
+```
+
+**Folders**
+
+| Setting | What it does |
+| --- | --- |
+| [Go to a folder by typing its name](https://zsh.sourceforge.io/Doc/Release/Options.html#index-AUTO_005fCD) | Typing only a folder's name goes to it, as `cd` does. |
+| [Remember the folders you visit](https://zsh.sourceforge.io/Doc/Release/Options.html#index-AUTO_005fPUSHD) | The folders you leave are remembered, each only once: `dirs -v` lists them, and `cd +1`, `cd +2`, and so on go back. |
+
+```zsh
+# Go to a folder by typing its name
+setopt AUTO_CD
+
+# Remember the folders you visit
+setopt AUTO_PUSHD PUSHD_IGNORE_DUPS
+```
+
+**Completion**
+
+| Setting | What it does |
+| --- | --- |
+| [Choose completions from a menu](https://zsh.sourceforge.io/Doc/Release/Completion-System.html#index-menu_002c-completion-style) | When Tab finds several completions, it opens a menu you move through with the arrow keys. |
+| [Complete names in any case](https://zsh.sourceforge.io/Doc/Release/Completion-System.html#index-matcher_002dlist_002c-completion-style) | Tab completes a name whatever its case, so `doc` completes to `Documents`. |
+
+The completion settings also start zsh's completion system, once, which the first line does.
+
+```zsh
+# Start the completion system once
+(( $+functions[compdef] )) || { autoload -Uz compinit && compinit }
+
+# Choose completions from a menu
+zstyle ':completion:*' menu select
+
+# Complete names in any case
+zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
+```
+
+**Colors**
+
+| Setting | What it does |
+| --- | --- |
+| Show colors in ls | `ls` shows folders, links, and programs in the Terminal theme's colors, as `man ls` describes `CLICOLOR`. |
+
+```zsh
+# Show colors in ls
+export CLICOLOR=1
+```
+
+### Git
+
+Peel uses the Git of Apple's Command Line Tools, or Homebrew's, and offers only the settings that Git lists in
+`git help --config`. If Git isn't on your Mac, the Git tab gives `xcode-select --install`, Apple's command for the
+tools.
+
+**Pull and push**
+
+| Setting | What it does |
+| --- | --- |
+| [Rebase when pulling](https://git-scm.com/docs/git-config#Documentation/git-config.txt-pullrebase) | `git pull` puts your commits after what it fetched, instead of adding a merge commit. |
+| [Push new branches without setting them up](https://git-scm.com/docs/git-config#Documentation/git-config.txt-pushautoSetupRemote) | `git push` on a new branch creates it on the remote and follows it, without `--set-upstream`. |
+| [Remove branches deleted on the remote](https://git-scm.com/docs/git-config#Documentation/git-config.txt-fetchprune) | `git fetch` removes its copies of the branches deleted on the remote, and your own branches stay. |
+| [Stash changes before a rebase](https://git-scm.com/docs/git-config#Documentation/git-config.txt-rebaseautoStash) | A rebase puts uncommitted changes aside and brings them back when it ends. |
+
+```sh
+# Rebase when pulling
+git config --global pull.rebase true
+
+# Push new branches without setting them up
+git config --global push.autoSetupRemote true
+
+# Remove branches deleted on the remote
+git config --global fetch.prune true
+
+# Stash changes before a rebase
+git config --global rebase.autoStash true
+```
+
+**Diffs and merges**
+
+| Setting | What it does |
+| --- | --- |
+| [Use the histogram diff](https://git-scm.com/docs/git-config#Documentation/git-config.txt-diffalgorithm) | Diffs first match the lines that appear rarely, so changes line up around them. |
+| [Color moved lines](https://git-scm.com/docs/git-config#Documentation/git-config.txt-diffcolorMoved) | Lines that moved without changing get colors of their own in a diff. |
+| [Show the original in conflicts](https://git-scm.com/docs/git-config#Documentation/git-config.txt-mergeconflictStyle) | A conflict shows the lines as they were before both changes, between the two sides. |
+| [Reuse conflict resolutions](https://git-scm.com/docs/git-config#Documentation/git-config.txt-rerereenabled) | Git remembers how you resolved a conflict and resolves the same conflict the same way next time. |
+
+```sh
+# Use the histogram diff
+git config --global diff.algorithm histogram
+
+# Color moved lines
+git config --global diff.colorMoved default
+
+# Show the original in conflicts
+git config --global merge.conflictStyle zdiff3
+
+# Reuse conflict resolutions
+git config --global rerere.enabled true
+```
+
+**Branches**
+
+| Setting | What it does |
+| --- | --- |
+| [Start new repositories on main](https://git-scm.com/docs/git-config#Documentation/git-config.txt-initdefaultBranch) | `git init` names the first branch main. |
+| [List branches by latest commit](https://git-scm.com/docs/git-config#Documentation/git-config.txt-branchsort) | `git branch` lists the branches with the most recent commit first. |
+| [Show lists in columns](https://git-scm.com/docs/git-config#Documentation/git-config.txt-columnui) | Commands such as `git branch` and `git tag` show their lists in columns when the window has room. |
+
+```sh
+# Start new repositories on main
+git config --global init.defaultBranch main
+
+# List branches by latest commit
+git config --global branch.sort -committerdate
+
+# Show lists in columns
+git config --global column.ui auto
+```
+
+**Signing**
+
+| Setting | What it does |
+| --- | --- |
+| [Sign commits with your SSH key](https://git-scm.com/docs/git-config#Documentation/git-config.txt-commitgpgSign) | Every commit is signed with your SSH key, and GitHub shows it as Verified once you add the key there as a signing key. Peel uses the first of `id_ed25519.pub`, `id_ecdsa.pub` and `id_rsa.pub` in `~/.ssh`, and turning it off stops only the signing. |
+
+```sh
+# Sign commits with your SSH key
+git config --global gpg.format ssh
+git config --global user.signingKey ~/.ssh/id_ed25519.pub
+git config --global commit.gpgSign true
+```
+
+### SSH
+
+The two lines that make ssh read Peel's file go at the end of `~/.ssh/config`. `Match all` comes first so they
+reach every server, even after a `Host` block:
+
+```
+Match all
+ Include "~/Library/Application Support/Peel/Terminal/ssh_config"
+```
+
+| Setting | What it does |
+| --- | --- |
+| [Keep key passphrases in your keychain](https://developer.apple.com/library/archive/technotes/tn2449/_index.html) | ssh asks for a key's passphrase once, saves it in your keychain, and adds the key to the agent. `UseKeychain` is macOS's own. |
+| [Keep connections alive](https://man.openbsd.org/ssh_config#ServerAliveInterval) | On a quiet connection, ssh checks on the server every minute, so a router doesn't drop it. |
+| [Reuse connections to a server](https://man.openbsd.org/ssh_config#ControlMaster) | A new connection to a server you're already connected to opens at once through the first, which stays open 10 minutes after the last one ends. |
+
+Without Peel, these lines can go at the end of `~/.ssh/config`, in a `Match all` block of their own:
+
+```
+Match all
+ # Keep key passphrases in your keychain
+ UseKeychain yes
+ AddKeysToAgent yes
+
+ # Keep connections alive
+ ServerAliveInterval 60
+
+ # Reuse connections to a server
+ ControlMaster auto
+ ControlPath ~/.ssh/cm-%C
+ ControlPersist 10m
+```
+
+## Tools
+
+Peel installs nothing: each tool comes with its Homebrew command and what its own documentation says to do after.
+If Homebrew isn't on your Mac, the Tools tab says so and gives the command from [brew.sh](https://brew.sh). The lines
+below use `$HOMEBREW_PREFIX`, as Homebrew's own notes do; Peel writes your Mac's Homebrew folder in its place.
+
+### For the shell
+
+| Tool | What it does | Install |
+| --- | --- | --- |
+| [zsh-completions](https://github.com/zsh-users/zsh-completions) | Completions for many more commands. If zsh then warns about insecure folders, `brew info zsh-completions` says how to fix it. | `brew install zsh-completions` |
+| [fzf-tab](https://github.com/Aloxaf/fzf-tab) | Tab completion in fzf, where typing narrows the list. It needs fzf. | `brew install fzf fzf-tab` |
+| [zoxide](https://github.com/ajeetdsouza/zoxide) | `z` goes to a folder you use from part of its name, and `zi` lets you choose. | `brew install zoxide` |
+| [fzf](https://github.com/junegunn/fzf) | Control-R searches your history and Control-T pastes files, and `--color=16` uses the Terminal theme's colors. | `brew install fzf` |
+| [direnv](https://github.com/direnv/direnv) | Sets a project's environment variables in its folder, from its `.envrc` once you allow it with `direnv allow`. | `brew install direnv` |
+| [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions) | Suggests the rest of a command from your history. | `brew install zsh-autosuggestions` |
+| [zsh-syntax-highlighting](https://github.com/zsh-users/zsh-syntax-highlighting) | Colors commands as you type them. | `brew install zsh-syntax-highlighting` |
+
+Their lines go in `~/.zshrc` in this order, and zsh-syntax-highlighting's must be the last line.
+
+```zsh
+# zsh-completions
+FPATH="$HOMEBREW_PREFIX/share/zsh-completions:$FPATH"
+autoload -Uz compinit && compinit
+
+# fzf-tab
+source "$HOMEBREW_PREFIX/opt/fzf-tab/share/fzf-tab/fzf-tab.zsh"
+zstyle ':completion:*' menu no
+
+# zoxide
+eval "$(zoxide init zsh)"
+
+# fzf
+source <(fzf --zsh)
+export FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS --color=16"
+
+# direnv
+eval "$(direnv hook zsh)"
+
+# zsh-autosuggestions
+source "$HOMEBREW_PREFIX/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
+
+# zsh-syntax-highlighting
+source "$HOMEBREW_PREFIX/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
+```
+
+### For Git
+
+| Tool | What it does | Install |
+| --- | --- | --- |
+| [delta](https://github.com/dandavison/delta) | Diffs with syntax highlighting and line numbers. | `brew install git-delta` |
+| [Git LFS](https://github.com/git-lfs/git-lfs) | Works with repositories that keep large files in LFS. | `brew install git-lfs` |
+| [lazygit](https://github.com/jesseduffield/lazygit) | A full Git interface inside Terminal: run `lazygit` in a repository. | `brew install lazygit` |
+
+Then run these once in Terminal.
+
+```sh
+# delta
+git config --global core.pager delta
+git config --global interactive.diffFilter 'delta --color-only'
+git config --global delta.navigate true
+
+# Git LFS
+git lfs install
+```
+
+### For every day
+
+| Tool | What it does | Install |
+| --- | --- | --- |
+| [bat](https://github.com/sharkdp/bat) | Shows files with syntax highlighting, and colors manual pages. | `brew install bat` |
+| [hyperfine](https://github.com/sharkdp/hyperfine) | Measures how long commands take, such as `hyperfine "zsh -i -c exit"` for a new shell. | `brew install hyperfine` |
+| [tlrc](https://github.com/tldr-pages/tlrc) | Short, practical examples for a command: `tldr` followed by its name. | `brew install tlrc` |
+
+bat's lines go in `~/.zshrc`. `col -bx` comes first because macOS's `man` marks bold text with backspaces, which bat
+would show as they are.
+
+```zsh
+# bat
+export BAT_THEME=ansi
+export MANPAGER="sh -c 'col -bx | bat -l man -p'"
+```
+
## Where the colors come from
<p align="center">
diff --git a/Terminal/Prompts/arrow.png b/Terminal/Prompts/arrow.png
new file mode 100644
index 00000000..59e76896
Binary files /dev/null and b/Terminal/Prompts/arrow.png differ
diff --git a/Terminal/Prompts/arrowAndBranch.png b/Terminal/Prompts/arrowAndBranch.png
new file mode 100644
index 00000000..f3e262ca
Binary files /dev/null and b/Terminal/Prompts/arrowAndBranch.png differ
diff --git a/Terminal/Prompts/classic.png b/Terminal/Prompts/classic.png
new file mode 100644
index 00000000..e615b5d3
Binary files /dev/null and b/Terminal/Prompts/classic.png differ
diff --git a/Terminal/Prompts/folderOnly.png b/Terminal/Prompts/folderOnly.png
new file mode 100644
index 00000000..8e1c6461
Binary files /dev/null and b/Terminal/Prompts/folderOnly.png differ
diff --git a/Terminal/Prompts/macOS.png b/Terminal/Prompts/macOS.png
new file mode 100644
index 00000000..7b3a005f
Binary files /dev/null and b/Terminal/Prompts/macOS.png differ
diff --git a/Terminal/Prompts/twoLines.png b/Terminal/Prompts/twoLines.png
new file mode 100644
index 00000000..ab79d71f
Binary files /dev/null and b/Terminal/Prompts/twoLines.png differ