v2.2.7 aefe19e

install.sh RawHistoryFolder

1#!/bin/sh
2set -e
3
4# Gordon installer script
5# Usage: curl -fsSL https://gordon.bnema.dev/install | bash
6
7REPO="bnema/gordon"
8INSTALL_DIR="/usr/local/bin"
9
10echo "Installing Gordon..."
11
12# Detect OS
13OS=$(uname -s | tr '[:upper:]' '[:lower:]')
14case "$OS" in
15    linux)
16        OS="linux"
17        ;;
18    darwin)
19        OS="darwin"
20        ;;
21    *)
22        echo "Error: Unsupported operating system: $OS"
23        exit 1
24        ;;
25esac
26
27# Detect architecture
28ARCH=$(uname -m)
29case "$ARCH" in
30    x86_64|amd64)
31        ARCH="amd64"
32        ;;
33    aarch64|arm64)
34        ARCH="arm64"
35        ;;
36    *)
37        echo "Error: Unsupported architecture: $ARCH"
38        exit 1
39        ;;
40esac
41
42echo "Detected: ${OS}/${ARCH}"
43
44# Construct download URL
45TARBALL="gordon_${OS}_${ARCH}.tar.gz"
46DOWNLOAD_URL="https://github.com/${REPO}/releases/latest/download/${TARBALL}"
47
48# Create temporary directory
49TMP_DIR=$(mktemp -d)
50trap 'rm -rf "$TMP_DIR"' EXIT
51
52echo "Downloading ${TARBALL}..."
53curl -fsSL "$DOWNLOAD_URL" -o "$TMP_DIR/$TARBALL"
54
55echo "Extracting..."
56tar -xzf "$TMP_DIR/$TARBALL" -C "$TMP_DIR"
57
58echo "Installing to ${INSTALL_DIR}..."
59if [ -w "$INSTALL_DIR" ]; then
60    mv "$TMP_DIR/gordon" "$INSTALL_DIR/gordon"
61else
62    echo "sudo required to install to ${INSTALL_DIR}"
63    sudo mv "$TMP_DIR/gordon" "$INSTALL_DIR/gordon"
64fi
65
66# Verify installation
67if command -v gordon >/dev/null 2>&1; then
68    echo ""
69    echo "Gordon installed successfully!"
70    gordon version
71else
72    echo ""
73    echo "Installation complete. You may need to add ${INSTALL_DIR} to your PATH."
74fi

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 7

Tags 106

↑↓ moveenter openesc close