main 6af0a61

blesh.sh RawHistoryFolder

1#!/bin/bash
2# Install and configure ble.sh (Bash Line Editor)
3# This provides advanced command-line editing features
4
5set -e
6
7# Get the username from the system
8USERNAME=$(find /home -maxdepth 1 -mindepth 1 -type d -printf '%f\n' | head -1)
9
10if [[ -z "${USERNAME}" ]]; then
11  echo "ERROR: Could not find user for ble.sh installation"
12  exit 1
13fi
14
15USER_HOME="/home/$USERNAME"
16BLESH_INSTALL_DIR="$USER_HOME/.local"
17
18echo "Installing ble.sh for user: $USERNAME"
19
20# Clone ble.sh repository
21echo "Cloning ble.sh repository..."
22cd /tmp
23if [ -d "ble.sh" ]; then
24  rm -rf ble.sh
25fi
26
27# Run as user to avoid permission issues
28sudo -u "$USERNAME" bash << EOF
29set -e
30cd /tmp
31git clone --recursive --depth 1 --shallow-submodules https://github.com/akinomyoga/ble.sh.git
32
33# Build and install ble.sh
34echo "Building and installing ble.sh..."
35make -C ble.sh install PREFIX="$BLESH_INSTALL_DIR"
36
37# Add ble.sh to .bashrc if not already present
38if ! grep -q "blesh/ble.sh" "$USER_HOME/.bashrc"; then
39  echo "" >> "$USER_HOME/.bashrc"
40  echo "# ble.sh - Bash Line Editor" >> "$USER_HOME/.bashrc"
41  echo "[[ \$- == *i* ]] && source -- ~/.local/share/blesh/ble.sh" >> "$USER_HOME/.bashrc"
42  echo "ble.sh added to .bashrc"
43else
44  echo "ble.sh already configured in .bashrc"
45fi
46EOF
47
48# Cleanup
49rm -rf /tmp/ble.sh
50
51echo "✓ ble.sh installed successfully"
52echo "  Location: $BLESH_INSTALL_DIR/share/blesh"
53echo "  Note: ble.sh will be active on next shell session"

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 1

Tags 0

    ↑↓ moveenter openesc close