Commit Graph

81 Commits

Author SHA1 Message Date
rootiest 9e7539d863 feat(deps): support upgrading fish itself via cargo install fish
Fish 4.x is a Rust rewrite published to crates.io as 'fish'. Added the
crate to the catalog so fish-deps update will run cargo install --force
fish to upgrade it. A yellow restart reminder is printed after the
upgrade since the new binary won't take effect until the shell restarts.

README warning updated to mention cargo install fish as the upgrade
path for users stuck on Fish 3.x.
2026-05-18 22:23:10 -04:00
rootiest 6fd1e3221e docs(readme): require Fish >= 4.0 and add Rust/cargo to dependencies 2026-05-18 22:20:16 -04:00
rootiest df7c921bc6 feat(deps): add cargo as a managed dependency with rustup installer
cargo is now the second entry in the catalog (after fish) so it is
installed before any Rust tool that depends on it. Install preference:
rustup installer (curl | sh) first, system PM as fallback. Update
runs rustup update when rustup is available.

The rustup-installer special is evaluated before the system PM in the
method list so it is always option 1 / the default for cargo.
2026-05-18 22:18:57 -04:00
rootiest abbbf20b40 fix(deps): restore paru install gated on pacman presence
On Arch-based systems (pacman present), paru-build offers yay or
makepkg as install methods. On non-Arch systems neither pacman nor yay
exist, so no methods are built and the dep is silently skipped — no
prompt shown to the user.
2026-05-18 22:14:45 -04:00
rootiest a70e88c344 fix(deps): remove paru install, enforce cargo preference for Rust tools
Catalog: clear paru's pm and special install entries so it appears in
status but fish-deps install skips it (it's a package manager, not a
managed dep).

Install: cargo is now always attempted first for Rust tools. When cargo
is absent but a crate exists, a note is printed suggesting rustup.
When only one method is available the chosen method is shown so the user
can see whether cargo or the system PM is being used. Method prompt now
shows the default label inline for clarity.

Removed dead paru-build switch case from the install executor.
2026-05-18 22:13:13 -04:00
rootiest a7c6b9097d fix(deps): consolidate install prompt into read -P to prevent display race 2026-05-18 22:07:50 -04:00
rootiest 0e7e824085 fix(deps): fix autoloading and Fish 4.x test compatibility
Split _fish_deps_pm.fish into one file per function so Fish can
autoload each by name (_fish_deps_detect_pm, _fish_deps_pm_install,
_fish_deps_pm_upgrade). A single file with multiple functions only
autoloads under the filename, leaving the others unreachable.

Replace all `test -a`/`test -o` binary operators with `; and`/`; or`
chains throughout _fish_deps_install and _fish_deps_update. Fish 4.x
removed support for -a/-o in test, causing the "unexpected argument"
errors seen on Debian.

Also consolidate paru/yay cases in pm_install and pm_upgrade since
both helpers use identical flags.
2026-05-18 22:05:56 -04:00
rootiest a3d99eec3f fix(aur): fall back to yay when paru is unavailable
upgrade, pkg, search, and parur now detect paru first, then yay, and
print a clear error if neither is installed. Removes the hard dependency
on paru specifically across all AUR-wrapper functions.
2026-05-18 22:01:00 -04:00
rootiest a86f797627 fix(deps): demote paru from required to recommended
paru is an AUR helper only available on Arch-based distros and is not
required for the config to function. Moved to recommended tier alongside
yay. README updated accordingly.
2026-05-18 21:59:56 -04:00
rootiest 1a6f1f3f2c feat(deps): add status symbols to fish-deps status output
Installed deps show a green ✓. Missing required/integration deps show
a red ✗. Missing recommended deps show a yellow ⚠ since they are
optional, distinguishing severity at a glance.
2026-05-18 21:56:50 -04:00
rootiest b82766ad52 feat(deps): add yay as supported AUR helper alongside paru
yay uses the same -S --noconfirm interface as paru. Detection priority
is paru > yay > pacman so paru is preferred when both are present.
When installing paru itself via paru-build special, yay -S paru is
offered as a method when yay is available, in addition to the
makepkg-from-source fallback.
2026-05-18 21:52:56 -04:00
rootiest 9b342114aa feat(deps): add fish-deps unified dependency management command
Introduces `fish-deps` with four subcommands:
- status: colored installed/missing report per tier (required/integrations/recommended)
- install: interactively install each missing dep, prompts method when multiple exist
- update: update all installed deps using their preferred method
- sync: install missing then update installed

Install method priority: cargo (Rust tools get latest crate) > system PM
(paru/pacman/apt/brew/pkg/dnf/yum) > git clone (fzf via fzf-update) >
curl installer (starship, fisher) > pipx (wakatime).

Splits into focused helper files:
- _fish_deps_catalog.fish: parallel-array dep catalog with tiers, cargo crates, PM names, special install keys
- _fish_deps_pm.fish: PM detection and install/upgrade helpers
- _fish_deps_status.fish: tier-grouped colored status display
- _fish_deps_install.fish: per-dep interactive install with method selection
- _fish_deps_update.fish: per-dep update using known install method

check_fish_deps becomes a thin wrapper delegating to `fish-deps status`.
README updated with Dependency Management section.
2026-05-18 21:51:22 -04:00
rootiest f09006846b fix(fzf): drop focus/resize bind entirely on older fzf builds
Older fzf (pre-0.62) does not support the focus and resize events in
bind actions, causing a startup error when --fish or the bundled
integration is sourced. Split the FZF_DEFAULT_OPTS preview block into
an if/else: newer fzf gets the dynamic bg-transform bind with wrap-word;
older fzf gets a static preview window with plain wrap and no event bind.
2026-05-18 21:47:20 -04:00
rootiest 2df665a537 feat(fzf): use fzf --fish integration and add fzf-update function
- config.fish: add ~/.fzf/bin to PATH for git-installed fzf
- config.fish: prefer fzf --fish | source (fzf >= 0.48, always
  version-matched) with fallback to integrations/fzf.fish for
  older builds; erase plugin bindings reliably when fzf is absent
- functions/fzf-update.fish: install or upgrade fzf from git HEAD
  using --bin so shell config files are not modified
2026-05-18 21:17:13 -04:00
rootiest 46be262f92 fix(fzf): erase fzf bindings in config.fish when fzf is absent
conf.d/fzf.fish is owned by Fisher and gets restored to the plugin's
original on fisher update, so any guard placed there is unreliable.
config.fish is never touched by Fisher, making it the right place to
call _fzf_uninstall_bindings after conf.d has already run and set up
the fzf key bindings on machines where fzf is not installed.
2026-05-18 21:06:09 -04:00
rootiest a442315312 Merge pull request 'fix(keybinds): guard bindings on required binaries and fix fzf compat' (#16) from fix/fzf-keybind-guards into main
Reviewed-on: #16
2026-05-19 00:56:29 +00:00
rootiest 6530935652 fix(fzf): omit toggle-raw bind on older fzf builds
toggle-raw is unavailable in fzf 0.60 devel. Gate it alongside
preview-wrap-sign using the existing _fzf_transform_action check,
consolidating both version-conditional variables into one block.
2026-05-18 20:54:10 -04:00
rootiest bdbdf2e8e0 fix(fzf): omit --preview-wrap-sign on older fzf builds
preview-wrap-sign is unavailable in fzf 0.60 devel. Reuse the
existing _fzf_transform_action gate to conditionally append it
to the history widget base options, keeping parity with the
wrap-word and bg-transform fallbacks.
2026-05-18 20:52:44 -04:00
rootiest d7471e2eca fix(fzf): fall back to plain wrap on older fzf lacking wrap-word
wrap-word in --preview-window was added alongside bg-transform.
Reuse the existing _fzf_transform_action variable (already inherited
by fzf-history-widget) to select wrap-word on newer fzf and plain
wrap on older builds — no additional version check needed.
2026-05-18 20:50:48 -04:00
rootiest 7acd099b3e fix(fzf): prefer bg-transform, fall back to transform on older fzf
Detect fzf version once at shell startup inside fzf_key_bindings.
Use bg-transform (non-blocking) on fzf >= 0.62 and the synchronous
transform on older builds (e.g. 0.60 devel which lacks bg-transform).
The chosen action is captured into fzf-history-widget via fish's
--inherit-variable so the check runs once, not on every Ctrl+R press.
2026-05-18 20:37:18 -04:00
rootiest e502cff8cb fix(keybinds): guard bindings on required binaries and fix fzf bg-transform
- conf.d/fzf.fish: skip fzf_configure_bindings if fzf is not in PATH
- key_bindings.fish: only bind Ctrl+Alt+= when qalc is installed
- _qalc_eval: return 1 early if qalc is absent so callers can react
- _smart_execute: fall back to normal execute when _qalc_eval returns 1
- integrations/fzf.fish: replace bg-transform with transform (available
  since fzf 0.53; bg-transform requires a newer version and caused
  "unknown action" errors on fzf 0.60 devel)
2026-05-18 20:34:00 -04:00
rootiest 50979acc1f Merge pull request 'feat(path): add resend to PATH' (#15) from feat/resend into main
Reviewed-on: #15
2026-05-19 00:21:36 +00:00
rootiest 4aea2f4e2c feat(path): add resend to PATH 2026-05-18 20:21:01 -04:00
rootiest be051daf1e Merge pull request 'fix(zoxide): restore CDPATH support in cd/z execution' (#14) from fix/cdpath-cd-execution into main
Reviewed-on: #14
2026-05-12 04:45:47 +00:00
rootiest 05139354cf fix(zoxide): restore CDPATH support in cd/z execution
The CDPATH regression was introduced when unifying completions: the `z`
function only checked `test -d` (absolute path existence) before falling
through to zoxide query, silently ignoring CDPATH-relative directories.
Now mirrors the completion logic — checks direct path, then each CDPATH
prefix, then zoxide — so `cd subdir` resolves correctly when `subdir`
lives under a CDPATH entry.
2026-05-12 00:43:59 -04:00
rootiest d2e7c799c4 docs(readme): use callouts for notes/tips
Use callouts and clearer wording in the Integrations section.
2026-05-12 00:08:00 -04:00
rootiest 233d75434c Merge pull request 'feat(completions): unify cd/z completions across CWD, CDPATH, and zoxide' (#13) from cd-completions into main
Reviewed-on: #13
2026-05-12 03:58:41 +00:00
rootiest 520217d4a9 fix(zoxide): suppress missing-zoxide startup message
Silent degradation is cleaner; the shell already handles the
missing binary gracefully without any output.
2026-05-11 23:57:46 -04:00
rootiest 4e255f4502 chore(license): add copyright/SPDX headers to zoxide files
- Add copyright + SPDX header to functions/zoxide.fish and
  conf.d/zoxide.fish (modified from original, owned by Rootiest)
- Add sourced-from attribution to completions/zoxide.fish
  (unmodified from icezyclon/zoxide.fish, MIT)
2026-05-11 23:47:27 -04:00
rootiest 6d91f49521 fix(completions): add cdi function as alias for zi
cdi was documented and expected to work as an interactive zoxide
directory picker but was never defined as a function, causing it
to silently fail. Wraps zi so completions are inherited correctly.
2026-05-11 23:37:21 -04:00
rootiest 2e3230974c feat(completions): unify cd/z completions across CWD, CDPATH, and zoxide
Previous to this commit, tab completion and auto-suggestions for cd/z
were inconsistent — only one or two of: CWD, CDPATH, and zoxide frecency
results would work at a time, with different sourced matches shown in
tab completion, shown in auto-suggest, and execution after pressing
<Enter>.

- Add _zoxide_z_complete in functions/zoxide.fish that merges all three
  sources into a single completion list (CWD via __fish_complete_cd,
  CDPATH via __fish_complete_directories, zoxide via query -l capped at
25)
- Wire the new completer to both z and cd via complete directives in
  conf.d/zoxide.fish, replacing the previous incomplete approach
- Add completions/zoxide.fish for full tab completion of the zoxide CLI
  itself (add, query, remove, import, init subcommands)
- Update README to document the unified completion behavior and fix
  structural issues in Personalization/Attribution/Dependencies sections
2026-05-11 23:28:59 -04:00
rootiest f93f9844dc build(ignore): add case-insensitive patterns for local testing and temporary files
Consolidates and expands the .gitignore to ignore various temporary and
testing directories. This allows for local experimentation with new
ideas
and the preservation of disabled functions without the risk of
accidentally committing them to the repository.
2026-05-11 23:22:18 -04:00
rootiest 9467d2c206 Merge pull request 'feat(functions,bindings): add smart-execute, fast-cli; refactor qalc and rm' (#12) from feat/smart-execute-fast-cli into main
Reviewed-on: #12
2026-05-10 05:40:06 +00:00
rootiest b62c2476da feat(functions,bindings): add smart-execute, fast-cli; refactor qalc and rm
- Add _smart_execute: context-aware Ctrl+Enter that routes to qalc when
  the buffer ends with '=', or falls through to standard execute otherwise
- Refactor qalc_eval → _qalc_eval (private helper, same behavior)
- Bind Ctrl+Enter to _smart_execute in all vi modes
- Add fast-cli wrapper (fast.com speed test) and fast placeholder with
  a friendly ANSI redirect message
- Add speedtest-fast abbreviation expanding to fast-cli
- Enhance _replace_command_token to handle sudo-prefixed commands: places
  cursor at index 5 (between sudo and the replacement slot)
- Improve rm error reporting: colored output, culprit-path listing, and
  cleaned technical detail for non-missing-file errors
- Add SPDX copyright headers to cat, ld, claude-docs, claude-pr functions
- Update README: Ctrl+Enter binding, fast-cli/fast functions, speedtest-fast abbr
2026-05-10 01:36:14 -04:00
rootiest 4dff7632cd Merge pull request 'refactor(config): use $__fish_config_dir, quote paths, add dot_fish var' (#11) from refactor/config-path-quoting-portability into main
Reviewed-on: #11
2026-05-08 20:30:02 +00:00
rootiest f70dccdc65 refactor(config): use \$__fish_config_dir, quote paths, add dot_fish var
Replace hardcoded \$HOME/.config/fish paths with the canonical
\$__fish_config_dir variable for portability. Add proper quoting around
all path strings. Introduce a dot_fish local variable to reduce
repetition in user-dots sourcing blocks. Add LESS=-R for color support
in the pager.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 16:29:05 -04:00
rootiest 9f524694cb Merge pull request 'feat(functions): add claude-docs and claude-pr helper functions' (#10) from feat/claude-helper-functions into main
Reviewed-on: #10
2026-05-08 17:39:40 +00:00
rootiest 37f35ce0a0 feat(functions): add claude-docs and claude-pr helper functions
Add two Claude Code helper functions to streamline common dev workflows:
- `claude-docs`: triggers Claude to sync README.md with recent session changes
- `claude-pr`: triggers Claude to create a branch, commit, push, and open a PR

Also add `.claude` to .gitignore and document both functions in README.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 13:37:41 -04:00
rootiest b08a3d364e Merge pull request 'docs(readme): add Ctrl+Alt+= qalc_eval keybinding to User Bindings table' (#9) from docs/keymaps into main
Reviewed-on: #9
2026-05-08 04:59:44 +00:00
rootiest 95f26eadc1 docs(readme): add Ctrl+Alt+= qalc_eval keybinding to User Bindings table
Documents the new inline Qalculate! evaluator shortcut added in the
recent config refactor, so users know it exists and how to use it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 00:57:38 -04:00
rootiest 337fb10cd4 Merge pull request 'feat(config): refactor config.fish, add XDG compliance, new functions, and keybindings' (#8) from feat/config-refactor-and-new-functions into main
Reviewed-on: #8
2026-05-08 04:52:49 +00:00
rootiest d8bd2b32ab feat(config): refactor config.fish, add XDG compliance, new functions, and keybindings
Restructure and expand the Fish shell configuration for better XDG compliance,
interactive-session gating, modularity, and ergonomics.

config.fish:
- Add full XDG Base Directory variable block (XDG_CONFIG_HOME, XDG_CACHE_HOME,
  XDG_DATA_HOME, XDG_STATE_HOME) and redirect tool caches/configs accordingly
  (cargo, rustup, go, bun, npm, gnupg, wakatime, wget, nvidia, codeium, etc.)
- Add editor setup with `type -q nvim` guard and NVIM_APPNAME
- Add CDPATH block (., ~/projects, ~) with explanatory comments
- Gate all interactive-only setup (key bindings, FZF, direnv, starship, secrets,
  local overrides, CLAUDE_CODE_NO_FLICKER) behind `status is-interactive`
- Guard FZF integration source behind a file-existence check
- Move secrets.fish and local.fish sourcing into the interactive block as overrides
- Remove obsolete universal `cdp` variable and duplicate PATH/editor blocks
- Update PATH entries to use XDG-resolved $CARGO_HOME and $BUN_INSTALL

conf.d/theme.fish:
- Move FZF_DEFAULT_OPTS (Catppuccin Mocha palette) from config.fish into theme.fish
  so all theming lives in one place
- Add section header for FZF colors; condense file header comment

conf.d/abbr.fish:
- Add `/exit` abbreviation as a vim-style alias for the `exit` builtin

conf.d/key_bindings.fish:
- Bind Ctrl+Alt+= to new `qalc_eval` function (inline Qalculate! evaluation)
- Add binding in both normal and all Vi modes
- Add descriptive comment block explaining the keybinding purpose

functions/bash.fish:
- Pass `--rcfile "$XDG_CONFIG_HOME/bash/bashrc"` so bash respects XDG config location

functions/cat.fish:
- Extend cat wrapper: detect directory arguments and delegate to `ls` instead of bat
- Preserve stdin-passthrough behavior when no arguments are provided

functions/__auto_source_fallback_venv.fish (new):
- Extract auto-venv PWD watcher from config.fish into its own autoloaded function file
- Skips activation when direnv manages the directory (.envrc present or DIRENV_DIR set)
- Deactivates venv when leaving its project tree

functions/ld.fish (new):
- Wrapper for lazydocker that injects the active Docker context's DOCKER_HOST,
  enabling correct context-aware operation

functions/joplin.fish (new):
- Joplin CLI wrapper function

functions/qalc_eval.fish (new):
- Inline Qalculate! evaluator: reads the current commandline buffer, passes it to
  `qalc`, prints the result, and clears the buffer for rapid-fire math in the shell

README.md:
- Remove stale `cdp` variable example from the local.fish documentation section

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 00:45:02 -04:00
rootiest a7833919a2 docs: update terminal, utility, and system function documentation in fish README 2026-04-30 23:36:29 -04:00
rootiest 0ab80b4716 Merge pull request 'Hotfix: split and y/cb functions' (#7) from fix/fallback-funcs into main
Reviewed-on: #7
2026-05-01 03:34:41 +00:00
rootiest bb681afa95 fix: ensure the split function handles other terminal emulators correctly 2026-04-30 23:33:00 -04:00
rootiest 85f45a9e8a refactor: properly alias cb to y
Instead of re-defining the same behavior, just write `cb` into the
y.fish function file as an alias for y
2026-04-30 23:32:37 -04:00
rootiest abc5379190 Merge pull request 'refactor(functions): standardize documentation, metadata, and wrappers' (#6) from feat/deps-fallbacks into main
Reviewed-on: #6
2026-05-01 03:18:34 +00:00
rootiest 084e6fb9ca refactor(functions): standardize documentation, metadata, and wrappers
- Add comprehensive `--description` flags to all fish functions for better `help` and `functions` output.
- Introduce and correct `--wraps` flags to ensure proper completions for aliased commands (e.g., `top` wrapping `btop`, `zellij`, `upgrade` wrapping `paru`).
- Prepend descriptive comments before function definitions for better source readability.
- Add standard copyright and SPDX license identifiers to shell scripts.
- Enhance script robustness by ensuring consistent terminal checks (Kitty, WezTerm) and graceful fallbacks in window/tab spawning functions (`spwin`, `tab`).
- Implement graceful fallbacks to basic core utilities when preferred modern alternatives are missing (e.g., `top` falling back to system `top` if `btop` is missing, `view` falling back to `less` or `cat` if `nvim` is unavailable).
- Improve overall code consistency across the `functions/` directory.
2026-04-30 23:16:28 -04:00
rootiest a4d8574f49 refactor: remove obsolete or private functions
Remove several functions that are either no longer relevant or belong in
.user-dots as local/machine-specific functions.
2026-04-30 23:13:44 -04:00
rootiest 0a89346a6c Merge pull request 'feat: harden terminal abbreviations, gracefully fallback missing integrations, and check deps' (#5) from feat/deps-fallbacks into main
Reviewed-on: #5
2026-05-01 01:18:19 +00:00