Remove the view command and the editor setting with it

`view` was the last user of `editor`, so leaving the setting behind would
have made it exactly what `gitkey` was until recently: documented,
parsed, and doing nothing. It is gone from the struct, the template, the
environment, `config -k` and the settings table.

Both names are free for aliases now, as `open` already was.

The tests that used `editor` as their example of a project-overridable
setting use `gitkey` instead, which is the same kind of thing and still
exists.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-26 19:11:06 +02:00
co-authored by Claude Opus 5
parent 65342bcd7c
commit cd5ab1a2bd
10 changed files with 17 additions and 64 deletions
+3 -7
View File
@@ -40,7 +40,7 @@ stand in. Outside `base` no project is selected. `mgsh <project>` starts the
interactive shell with that project preselected.
The commands available directly from the shell are `clone`, `init`, `log`,
`push`, `pushremote`, `release`, `list`, `tag`, `archive`, `show`, `view`,
`push`, `pushremote`, `release`, `list`, `tag`, `archive`, `show`,
`pull`, `fetch`, `status`, `diff`, `overview`, `config`, `count`, `login` and
`cloneall`; every other command is interactive-only.
@@ -52,7 +52,7 @@ project, its git branch and a `*` dirty marker:
```
Features: command history (`~/.mgsh_history`), Tab completion (commands, local
projects for `cd`/`view`, server repos for `clone`/`show`, branches/tags for
projects for `cd`, server repos for `clone`/`show`, branches/tags for
`checkout`/`tag`, mirror targets for `pushremote`/`release`, filesystem paths for
`dist`, and shell-style completion after `!` and for aliases that expand to
one), and colored `list`/`log`/error output.
@@ -106,7 +106,6 @@ Run `help` for the full list. Highlights:
| command | description |
|---------------------------|------------------------------------------------|
| `cd [project]` | change project (no argument: back to the base) |
| `view [project]` | open a project in Xcode / the configured editor |
| `push [comment]` | commit everything and push to the server |
| `pushremote [desc]` | mirror the repo to a public server (gitea/github/gitlab) |
| `pull` / `fetch` | pull / fetch from the server |
@@ -145,7 +144,6 @@ project /Users/me/src/myproject/.mgshrc
gitport 22
gituser git
gitpath /home/git
editor code (.mgshrc)
remotes hub (.mgshrc)
clone url ssh://git@git.example.com:22/home/git
@@ -410,7 +408,6 @@ gitpath = /home/git
gitname = Your Name
gitemail = you@example.com
pushdefault = matching
editor = code # fallback opener for `view`
alias co 'checkout $1'
```
@@ -436,7 +433,6 @@ setting.
| `gitname` | global | `user.name` written to the **global** git config at startup |
| `gitemail` | global | `user.email` written to the global git config |
| `pushdefault` | global | `push.default` written to the global git config |
| `editor` | project | opener used by `view` when the project has no Xcode workspace (default `coda`) |
| `remote.<name>.url` | project | base URL of the mirror target `<name>` |
| `remote.<name>.key` | project | API token for that target |
| `remote.<name>.type` | project | `gitea`\|`github`\|`gitlab`; auto-detected from the url when unset |
@@ -453,7 +449,7 @@ only when they actually differ, so a plain `mgsh status` does not rewrite
A project may carry its own `.mgshrc`, which overrides the global settings while
that project is active — a project on a different git server, with a different
editor, or mirrored to a different place:
ssh identity, or mirrored to a different place:
```ini
# ~/src/myproject/.mgshrc