Skip to content

Linux ins - #6

Merged
IamShreshth merged 10 commits into
IamShreshth:mainfrom
youngoat911:linux_ins
Oct 22, 2026
Merged

IamShreshth merged 10 commits into
IamShreshth:mainfrom
youngoat911:linux_ins

Conversation

@youngoat911

Copy link
Copy Markdown
Contributor

Summary

This PR upgrades tman's responsiveness, shell integration, Git/project workflows, and Linux documentation while keeping zero new runtime or Cargo dependencies:

1. Mission Control Telemetry, Caching & Active Ports (src/sys.rs, src/app.rs)

  • Telemetry Caching (ctx_cache): Caches the Mission Control preview while moving the cursor in Mode::Menu so Up/Down navigation no longer spawns pmset or disk/directory reads on every keystroke; invalidates automatically on chdir or bookmark updates.
  • Real Used / Total RAM: Reports actual used / total (pct%) memory usage on Linux (MemAvailable in /proc/meminfo & libc::sysinfo fallback) and macOS (vm_stat + hw.memsize) instead of static total RAM.
  • Active Ports & Process Killer (Mode::Ports): New Ports action in Mission Control that inspects listening TCP ports (lsof / ss) with port number, process name, and PID, allowing stuck dev servers to be terminated on Enter (guarded by safety::classify confirmation).

2. Shell Parity: Bash Auto-Execute, Fish Support & cd on Quit (src/init.rs, src/main.rs, src/app.rs)

  • Bash Auto-Execute (Enter) vs. Edit (Tab): Uses Readline macro chaining (\C-x\C-t\C-x\C-e) in tman init bash so Enter executes immediately (mode == x) and Tab inserts into the readline buffer (mode == i), matching Zsh's behavior.
  • Fish Shell Integration (tman init fish): Adds native Fish wrapper and keybinding widget using commandline -r and commandline -f execute.
  • cd on Quit (Q): Pressing Q in Navigate (Mode::Files) exits the HUD and cds the parent shell directly into the browsed directory (app.cwd).

3. Interactive Git Staging, Branch Switcher, Stash Picker & Ahead/Behind (src/git.rs, src/app.rs, src/ui.rs)

  • In-Place File Staging (Space): Press Space in Git -> Changed files (Mode::GitFiles) to toggle git add / git restore --staged live without leaving the HUD, plus adds a Discard changes (git checkout --) file action.
  • Interactive Branch Switcher (Mode::GitBranches): Lists local and remote branches sorted by recent commit with a live commit-log preview pane; pressing Enter runs git switch <branch>.
  • Interactive Stash Picker (Mode::GitStashes): Lists saved stashes with a live git stash show -p diff preview pane; pressing Enter runs git stash pop <stash>.
  • Ahead / Behind Counts: Parses porcelain branch headers and displays ↑ahead ↓behind in the top status bar.

4. Smart Project Discovery, .tman.toml & Masked .env Preview (src/run.rs)

  • Upward Git-Root Discovery: When tman is launched inside a nested subdirectory (e.g. src/), Run falls back to GitInfo::root to discover project manifests (Cargo.toml, package.json, Makefile, Justfile, pyproject.toml, go.mod, docker-compose.yml) and automatically prefixes cd -- <root> && when needed.
  • Recipe & Script Previews: Displays the actual package.json script command or Makefile/Justfile target recipe in the Run list and preview pane.
  • Repo-Local .tman.toml & .env Inspector: Loads custom [scripts] from .tman.toml and previews .env keys with secret values masked (KEY = ***).

5. Search, Fuzzy Highlighting, zoxide Dirs & Config Fix (src/fs.rs, src/fuzzy.rs, src/config.rs, src/ui.rs)

  • .gitignore-Aware File Search: Uses git ls-files -oi --exclude-standard --directory in fs::walk when hidden files are off so build artifacts (dist/, build/, .next/, etc.) are skipped automatically.
  • Multi-Word Fuzzy Search & Match Highlighting: Supports space-separated tokens in any order (fuzzy::score / fuzzy::matched_indices) and highlights matched characters in the active accent color.
  • Auto-Recent Directories (zoxide): Populates Mode::Bookmarks with up to 15 recent directories (↺) from zoxide query -l alongside pinned bookmarks (*).
  • Config [ui] Table Scoping Fix: Ensures Config::set_accent inserts missing accent = keys inside [ui] rather than at EOF under [safety].

6. Installer Fix & Linux Distro Documentation (files/install.sh, README.md)

  • Fixes unbound variable handling in files/install.sh under set -u.
  • Expands README.md with step-by-step installation, prerequisites, clipboard/desktop packages (wl-clipboard, xclip, xdg-utils), and bash/zsh/fish activation instructions for Arch Linux, Fedora, and Ubuntu / Debian.

Test Plan

  • cargo test — 13/13 unit tests pass (including new tests for [ui] accent persistence, zsh/bash/fish init scripts, porcelain ahead/behind parsing, multi-token fuzzy matching/indices, and subdirectory Git-root workflow discovery)
  • cargo build --release — compiles cleanly with 0 warnings

@IamShreshth

Copy link
Copy Markdown
Owner

@youngoat911 resolve conflicts
and lemme know i will merged it

@IamShreshth

Copy link
Copy Markdown
Owner

@youngoat911 resolve conflicts and lemme know i will merged it

nvm i resolved it

@IamShreshth
IamShreshth merged commit 295028e into IamShreshth:main Oct 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants