Remove the open command

`open` and `view` shared one implementation and differed in a single
line: `open` also made the project the active one. Only `view` is left,
with the behaviour it always had.

Dropping it from builtinCmds is the part worth noting: a reserved word
cannot be shadowed by an alias, so `open` is now free for one --
`alias open '!xdg-open $1'` works, which it could not before. That also
made a completion test wrong, since it used `open` as its example of a
name a builtin owns; it uses `status` now.

The `runInDir(d, "open", ...)` calls stay: those are macOS's open(1),
which is how an Xcode workspace gets opened.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-26 18:35:45 +02:00
co-authored by Claude Opus 5
parent 0d0d28560e
commit 65342bcd7c
8 changed files with 17 additions and 20 deletions
+1 -1
View File
@@ -145,7 +145,7 @@ func parseArgs() (int, string, bool) {
}
cls := map[string]int{
"clone": 2, "init": 2, "log": 2,
"push": 1, "pushremote": 1, "list": 1, "tag": 1, "archive": 1, "show": 1, "open": 1,
"push": 1, "pushremote": 1, "list": 1, "tag": 1, "archive": 1, "show": 1, "view": 1,
"pull": 1, "fetch": 1, "status": 1, "diff": 1, "overview": 1,
"config": 1, "count": 1, "login": 1, "cloneall": 1, "release": 1,
}