markdown · 3967 bytes Raw Blame History

fuss

(noun) : the quicker picker upper

An interactive tree utility for complete git workflows, written in modern Fortran.

Features

  • Shows a tree structure of git files (modified, staged, untracked)
  • Proper UTF-8 tree rendering with box-drawing characters (├──, └──, )
  • Color-coded status indicators:
    • Green - Staged changes (ready to commit)
    • Yellow - pending changes from remote
    • Red - Modified tracked files
    • Dim grey - Untracked files
  • Supports --all/-a flag to show all files (with status marked)
  • Alphabetically sorted output matching the tree command format
  • Interactive mode with full git workflow: stage, unstage, commit, push, diff (with pager), status (with pager), fetch, and pull

Installing

AUR

paru -S fuss
or
yay -s fuss

Homebrew

brew tap FortranGoingOnForty/fuss
brew install fuss

RPM

sudo dnf config-manager --add-repo https://repos.musicsian.com/musicsian.repo
sudo dnf install fuss

Building

make

Usage

Show only dirty files (default):

./fuss

Show all files with dirty ones marked:

./fuss --all
./fuss -a       # Shorthand

Interactive mode (full git workflow):

./fuss -i
./fuss --interactive
./fuss -i -a    # Interactive mode with all files

Interactive Mode Controls

Navigation:

  • j or : Move down
  • k or : Move up

Git Operations:

  • a: Stage file (git add)
  • u: Unstage file (git restore --staged)
  • m: Commit with message prompt
  • f: fetch from remote
  • l: pull from remote
  • d: diff selected file in pager
  • p: Push to remote
  • s: View full git status (scrollable with less)

Other:

  • q: Quit interactive mode

Example Output

Normal Mode

Dirty files only:

.
├── README.md ✗      # Red ✗ = modified
├── fuss.f90 ✗       # Red ✗ = modified
└── new_file.txt ✗   # Grey ✗ = untracked

All files:

.
├── .gitignore
├── Makefile
├── README.md ✗      # Red ✗ = modified
├── fuss ↑           # Green ↑ = staged
├── fuss.f90 ↑✗      # Both staged AND unstaged changes
└── fuss.o

Interactive Mode

fuss:trunk           # Cyan repo name : Yellow branch name

.
├── README.md ✗      # ← Currently selected (highlighted)
├── fuss.f90 ↑
└── src
    └── main.f90 ✗

↑=staged ✗=modified ✗=untracked
j/k/↓/↑: navigate | a: stage | u: unstage | m: commit | p: push | s: status | q: quit

Status Indicators:

  • Green - Staged (ready to commit)
  • Red - Modified tracked file
  • Dim grey - Untracked file
  • ↑✗ - File has both staged and unstaged changes

Interactive Mode Details

Interactive mode provides a complete git workflow TUI:

  • Repository and branch name in status bar (repo:branch)
  • Tree navigation through all files and directories
  • Color-coded status indicators (staged, modified, untracked)
  • Visual highlighting of selected item

Git Workflow:

  • Stage (a) - Add files to staging area with git add
  • Unstage (u) - Remove from staging with git restore --staged
  • Commit (m) - Interactive commit message prompt
  • Push (p) - Push commits to remote repository
  • Status (s) - View full git status output in scrollable less viewer

Technical Details:

  • Uses stty cbreak -echo for character-by-character input with proper newline handling
  • ANSI escape codes for colors and highlighting (ESC[7m for selection, ESC[31m for red, etc.)
  • Reads arrow key escape sequences (ESC[A, ESC[B for up/down)
  • Automatically refreshes view after git operations
  • Restores terminal with stty sane on exit

Directory Expansion:

  • Automatically expands untracked directories (e.g., dir/ → shows all files inside)
  • Proper nested directory tree structure maintained
View source
1 # fuss
2 (noun) : the quicker picker upper
3
4 An interactive tree utility for complete git workflows, written in modern Fortran.
5
6 ## Features
7
8 - Shows a tree structure of git files (modified, staged, untracked)
9 - Proper UTF-8 tree rendering with box-drawing characters (`├──`, `└──`, `│`)
10 - **Color-coded status indicators:**
11 - Green `↑` - Staged changes (ready to commit)
12 - Yellow `↓` - pending changes from remote
13 - Red `✗` - Modified tracked files
14 - Dim grey `✗` - Untracked files
15 - Supports `--all`/`-a` flag to show all files (with status marked)
16 - Alphabetically sorted output matching the `tree` command format
17 - **Interactive mode** with full git workflow: stage, unstage, commit, push, diff (with pager), status (with pager), fetch, and pull
18
19 ## Installing
20
21 ### AUR
22
23 ```bash
24 paru -S fuss
25 or
26 yay -s fuss
27 ```
28
29 ### Homebrew
30
31 ```bash
32 brew tap FortranGoingOnForty/fuss
33 brew install fuss
34 ```
35
36 ### RPM
37 ```bash
38 sudo dnf config-manager --add-repo https://repos.musicsian.com/musicsian.repo
39 sudo dnf install fuss
40 ```
41
42 ## Building
43
44 ```bash
45 make
46 ```
47
48 ## Usage
49
50 Show only dirty files (default):
51 ```bash
52 ./fuss
53 ```
54
55 Show all files with dirty ones marked:
56 ```bash
57 ./fuss --all
58 ./fuss -a # Shorthand
59 ```
60
61 Interactive mode (full git workflow):
62 ```bash
63 ./fuss -i
64 ./fuss --interactive
65 ./fuss -i -a # Interactive mode with all files
66 ```
67
68 ### Interactive Mode Controls
69
70 **Navigation:**
71 - `j` or `↓`: Move down
72 - `k` or `↑`: Move up
73
74 **Git Operations:**
75 - `a`: Stage file (git add)
76 - `u`: Unstage file (git restore --staged)
77 - `m`: Commit with message prompt
78 - `f`: fetch from remote
79 - `l`: pull from remote
80 - `d`: diff selected file in pager
81 - `p`: Push to remote
82 - `s`: View full git status (scrollable with `less`)
83
84 **Other:**
85 - `q`: Quit interactive mode
86 ## Example Output
87
88 ### Normal Mode
89
90 Dirty files only:
91 ```
92 .
93 ├── README.md ✗ # Red ✗ = modified
94 ├── fuss.f90 ✗ # Red ✗ = modified
95 └── new_file.txt ✗ # Grey ✗ = untracked
96 ```
97
98 All files:
99 ```
100 .
101 ├── .gitignore
102 ├── Makefile
103 ├── README.md ✗ # Red ✗ = modified
104 ├── fuss ↑ # Green ↑ = staged
105 ├── fuss.f90 ↑✗ # Both staged AND unstaged changes
106 └── fuss.o
107 ```
108
109 ### Interactive Mode
110
111 ```
112 fuss:trunk # Cyan repo name : Yellow branch name
113
114 .
115 ├── README.md ✗ # ← Currently selected (highlighted)
116 ├── fuss.f90 ↑
117 └── src
118 └── main.f90 ✗
119
120 ↑=staged ✗=modified ✗=untracked
121 j/k/↓/↑: navigate | a: stage | u: unstage | m: commit | p: push | s: status | q: quit
122 ```
123
124 **Status Indicators:**
125 - Green `↑` - Staged (ready to commit)
126 - Red `✗` - Modified tracked file
127 - Dim grey `✗` - Untracked file
128 - `↑✗` - File has both staged and unstaged changes
129
130 ### Interactive Mode Details
131
132 Interactive mode provides a complete git workflow TUI:
133
134 - Repository and branch name in status bar (`repo:branch`)
135 - Tree navigation through all files and directories
136 - Color-coded status indicators (staged, modified, untracked)
137 - Visual highlighting of selected item
138
139 **Git Workflow:**
140 - **Stage** (`a`) - Add files to staging area with `git add`
141 - **Unstage** (`u`) - Remove from staging with `git restore --staged`
142 - **Commit** (`m`) - Interactive commit message prompt
143 - **Push** (`p`) - Push commits to remote repository
144 - **Status** (`s`) - View full `git status` output in scrollable `less` viewer
145
146 **Technical Details:**
147 - Uses `stty cbreak -echo` for character-by-character input with proper newline handling
148 - ANSI escape codes for colors and highlighting (`ESC[7m` for selection, `ESC[31m` for red, etc.)
149 - Reads arrow key escape sequences (`ESC[A`, `ESC[B` for up/down)
150 - Automatically refreshes view after git operations
151 - Restores terminal with `stty sane` on exit
152
153 **Directory Expansion:**
154 - Automatically expands untracked directories (e.g., `dir/` → shows all files inside)
155 - Proper nested directory tree structure maintained
156