v0.19.0 55a688e

cli_shell_windows.go RawHistoryFolder

1// SPDX-License-Identifier: AGPL-3.0-or-later
2
3//go:build windows
4
5package app
6
7import (
8	"context"
9	"io/fs"
10	"os"
11	"os/exec"
12	"syscall"
13)
14
15// shellCommand runs line with `cmd /C`. The command line is passed as is:
16// Go's argument quoting would mangle quotes cmd.exe means to read itself.
17//
18// The command is killed with exec.CommandContext on a timeout or a signal:
19// only cmd.exe itself, not what it started (there is no process group kill
20// here); foreground is ignored.
21func shellCommand(ctx context.Context, line string, _ bool) *exec.Cmd {
22	c := exec.CommandContext(ctx, "cmd")
23	c.SysProcAttr = &syscall.SysProcAttr{CmdLine: "cmd /C " + line}
24	return c
25}
26
27// openConfig opens the config file.
28func openConfig(path string) (*os.File, error) { return os.Open(path) }
29
30// checkPrivate is a no-op on Windows: it has no Unix mode bits or owner ids to
31// check, so token.cmd is run from a config file whoever can write it. The
32// per-user config directory (%AppData%) is private to the user by default;
33// keep ERMITE_CONFIG out of shared folders.
34func checkPrivate(string, fs.FileInfo, int) error { return nil }

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 2

Tags 44

↑↓ moveenter openesc close