https://github.com/fdel-ux64/fish-config
Personal Fish shell toolkit with cross-distro utilities, reusable helpers, and Fisher-ready functions.
https://github.com/fdel-ux64/fish-config
cli dotfiles fish fish-shell fisher linux shell shell-functions unix
Last synced: 7 days ago
JSON representation
Personal Fish shell toolkit with cross-distro utilities, reusable helpers, and Fisher-ready functions.
- Host: GitHub
- URL: https://github.com/fdel-ux64/fish-config
- Owner: fdel-ux64
- Created: 2025-12-25T08:38:27.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-05-17T05:43:22.000Z (19 days ago)
- Last Synced: 2026-05-17T07:43:39.581Z (19 days ago)
- Topics: cli, dotfiles, fish, fish-shell, fisher, linux, shell, shell-functions, unix
- Language: Shell
- Homepage:
- Size: 259 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π Personal Fish configuration
A curated Fish shell toolkit with cross-distro utilities and reusable helpers.
Primarily maintained for personal use, but many utilities are **cross-distro compatible**, working on Arch, Debian/Ubuntu, and RPM-based Linux systems.
Not intended as a fully stable public plugin suite, yet mature tools are documented and may be useful to others.
> π§ Works on Arch, Debian/Ubuntu, and RPM-based Linux distributions
---
## β¨ Highlights
- **Multi-distro package inspection**: unified `installed_packages` for Arch, Debian/Ubuntu, and RPM systems
- **Consistent package history** across distributions
- **Interactive Fish shell helpers**: search & cleanup history with range selection, inspect functions
- **Secure password generation** with environment-aware clipboard handling
- **Cross-platform kernel version checks**
- **Archive creation and extraction**: smart format detection, overwrite protection, and pigz/zstd acceleration
- **Fish file formatting** via `fish_indent` with single-file and directory modes
- **Fisher-compatible** functions, completions, and keybindings
---
## π₯ Installation
### π£ Using [Fisher](https://github.com/jorgebucaran/fisher) (Recommended)
```
fisher install fdel-ux64/fish-config
```
---
> π οΈ Cross-distro tools: Works on Arch, Debian/Ubuntu, and RPM-based Linux distributions
### π¦ `installed_packages` (Unified dispatcher)
Automatically detects your distribution and calls the appropriate backend:
- `rpm_installed` β RPM-based systems (Fedora, RHEL, CentOSβ¦)
- `deb_installed` β Debian-based systems (Debian, Ubuntu, Mint, Pop!_OSβ¦)
- `arch_installed` β Arch-based systems (Arch, Manjaro, EndeavourOSβ¦)
Single portable entry point with full feature parity across all backends β `package` search, `on DATE`, and all time-based subcommands work identically on RPM, Arch, and Debian systems.
**Usage:**
```
installed_packages [OPTION]
installed_packages days N
installed_packages on DATE
installed_packages this-week
installed_packages count [OPTION]
installed_packages since DATE [until DATE]
installed_packages package NAME
installed_packages package 'PATTERN'
installed_packages --refresh
installed_packages --backend
```
| Option | Alias | Description |
| ------------------- | ----- | ---------------------------------------------------------- |
| `today` | `td` | Packages installed today |
| `yesterday` | `yd` | Packages installed yesterday |
| `days N` | | Packages installed in the last N days (today included) |
| `on DATE` | | Packages installed on an exact date β e.g. `on 2026-05-15` |
| `this-week` | `tw` | Packages installed this calendar week (Mon β today) |
| `last-week` | `lw` | Packages installed in the last 7 days |
| `this-month` | `tm` | Packages installed this calendar month |
| `last-month` | `lm` | Packages installed in the previous month |
| `per-day` | | Count packages per day |
| `per-week` | | Count packages per week |
| `package NAME` | | Full install history for an exact package name |
| `package 'PATTERN'` | | Full install history with glob β e.g. `'kern*'`, `'*lib*'` |
Aliases are case-insensitive (TD, Td, etc.).
| Flag | Description |
| ----------- | ------------------------------------ |
| `--backend` | Show detected backend |
| `--refresh` | Refresh cache (delegated to backend) |
**Examples:**
```
installed_packages today
installed_packages days 3
installed_packages tw
installed_packages lw
installed_packages on 2026-05-15
installed_packages count this-week
installed_packages count last-week
installed_packages count on 2026-05-15
installed_packages since 2026-02-01
installed_packages package cups
installed_packages package 'kern*'
installed_packages --backend
```
> β οΈ **Glob quoting:** always quote patterns containing `*` β without quotes, Fish expands them as filesystem globs before the function sees them. Exact names (`cups`) need no quotes.
---
### π¦ `rpm_installed`
Backend for RPM-based systems. Also available as a standalone plugin:
Lists installed RPM packages by installation date, grouped by day, with caching for faster repeated queries. Ensures consistent date parsing using the US English locale.
**Scope:** RPM-based distributions (Fedora, RHEL, CentOSβ¦)
**Usage:**
```
rpm_installed [OPTION]
rpm_installed days N
rpm_installed on DATE
rpm_installed this-week
rpm_installed count [OPTION]
rpm_installed since DATE [until DATE]
rpm_installed package NAME
rpm_installed package 'PATTERN'
rpm_installed --refresh | --cache on|off | --cache | --help
```
| Option | Alias | Description |
| ------------------- | ----- | ---------------------------------------------------------- |
| `today` | `td` | Packages installed today |
| `yesterday` | `yd` | Packages installed yesterday |
| `days N` | | Packages installed in the last N days (today included) |
| `on DATE` | | Packages installed on an exact date β e.g. `on 2026-05-15` |
| `this-week` | `tw` | Packages installed this calendar week (Mon β today) |
| `last-week` | `lw` | Packages installed in the last 7 days |
| `this-month` | `tm` | Packages installed this calendar month |
| `last-month` | `lm` | Packages installed in the previous month |
| `per-day` | | Count packages per day |
| `per-week` | | Count packages per week |
| `package NAME` | | Full install history for an exact package name |
| `package 'PATTERN'` | | Full install history with glob β e.g. `'kern*'`, `'*lib*'` |
| Flag | Description |
| ------------- | ---------------------------------------------------------------- |
| `--refresh` | Clear and rebuild the cache on next call (caching stays enabled) |
| `--cache on` | Enable caching (default) |
| `--cache off` | Disable caching β RPM is queried live on every call |
| `--cache` | Show current cache status |
**Output β date range query:**
```
π¦ Installed packages β last-week
π Wed 2026-03-18 (5 packages)
onnx-libs-1.17.0-12.fc43.x86_64
zlib-ng-2.3.3-2.fc43.x86_64
π Thu 2026-03-19 (9 packages)
firefox-148.0.2-2.fc43.x86_64
libtasn1-4.21.0-1.fc43.x86_64
...
ββββββββββββββββββββββββββββββββββββ
π’ Total: 14 packages β last-week
πΎ Cache: session cache
```
**Output β package search:**
```
π¦ Package history β kern*
π Sat 2026-05-09 (5 packages)
09:30 CEST kernel-core-7.0.4-200.fc44.x86_64
09:30 CEST kernel-modules-7.0.4-200.fc44.x86_64
09:30 CEST kernel-7.0.4-200.fc44.x86_64
...
π Thu 2026-05-14 (6 packages)
10:50 CEST kernel-core-7.0.6-200.fc44.x86_64
10:50 CEST kernel-7.0.6-200.fc44.x86_64
...
ββββββββββββββββββββββββββββββββββββ
π’ 11 install records matching 'kern*'
πΎ Cache: session cache
```
The filter label is always repeated in the footer, so it remains visible without scrolling up. Package search shows install time to the minute. Cache status is shown on every listing. Output is automatically paged with `less` when it exceeds the terminal height.
**Examples:**
```
rpm_installed tw
rpm_installed lw
rpm_installed days 3
rpm_installed on 2026-05-15
rpm_installed count this-week
rpm_installed count days 5
rpm_installed count on 2026-05-15
rpm_installed count this-month
rpm_installed since 2025-12-16 until 2025-12-22
rpm_installed package cups
rpm_installed package 'kern*'
rpm_installed package 'python3*'
rpm_installed --cache off
```
> β οΈ **Glob quoting:** always quote patterns containing `*` β without quotes, Fish expands them as filesystem globs before the function sees them. Exact names (`cups`) need no quotes.
---
### π¦ `arch_installed`
Backend for Arch-based systems. Equivalent of `rpm_installed`, using `expac` as the data source.
**Scope:** Arch-based distributions (Arch Linux, Manjaro, EndeavourOSβ¦)
**Dependencies:** `expac`, Fish shell, GNU date
> π‘ If `expac` is not installed, `arch_installed` will prompt to install it via `sudo pacman -S expac` β no need to run it manually first.
**Usage:**
```
arch_installed [OPTION]
arch_installed days N
arch_installed on DATE
arch_installed this-week
arch_installed count [OPTION]
arch_installed since DATE [until DATE]
arch_installed package NAME
arch_installed package 'PATTERN'
arch_installed --refresh | --cache on|off | --cache | --help
```
| Option | Alias | Description |
| ------------------- | ----- | ----------------------------------------------------------- |
| `today` | `td` | Packages installed today |
| `yesterday` | `yd` | Packages installed yesterday |
| `days N` | | Packages installed in the last N days (today included) |
| `on DATE` | | Packages installed on an exact date β e.g. `on 2026-05-15` |
| `this-week` | `tw` | Packages installed this calendar week (Mon β today) |
| `last-week` | `lw` | Packages installed in the last 7 days |
| `this-month` | `tm` | Packages installed this calendar month |
| `last-month` | `lm` | Packages installed in the previous month |
| `per-day` | | Count packages per day |
| `per-week` | | Count packages per week |
| `package NAME` | | Full install history for an exact package name |
| `package 'PATTERN'` | | Full install history with glob β e.g. `'linux*'`, `'*lib*'` |
| Flag | Description |
| ------------- | ---------------------------------------------------------------- |
| `--refresh` | Clear and rebuild the cache on next call (caching stays enabled) |
| `--cache on` | Enable caching (default) |
| `--cache off` | Disable caching β expac is queried live on every call |
| `--cache` | Show current cache status |
The filter label is always repeated in the footer, so it remains visible without scrolling up. Package search shows install time to the minute. Cache status is shown on every listing. Output is automatically paged with `less` when it exceeds the terminal height.
**Examples:**
```
arch_installed tw
arch_installed lw
arch_installed days 3
arch_installed on 2026-05-15
arch_installed count this-week
arch_installed count days 5
arch_installed count on 2026-05-15
arch_installed count this-month
arch_installed since 2024-01-01 until 2024-02-01
arch_installed package linux
arch_installed package 'linux*'
arch_installed package '*lib*'
arch_installed --cache off
```
> β οΈ **Glob quoting:** always quote patterns containing `*` β without quotes, Fish expands them as filesystem globs before the function sees them. Exact names (`linux`) need no quotes.
---
### π¦ `deb_installed`
Backend for Debian-based systems. Equivalent of `rpm_installed`, reconstructing install timestamps from dpkg logs.
**Scope:** Debian-based distributions (Ubuntu, Debian, Linux Mint, Pop!_OSβ¦)
**Dependencies:** Fish shell, awk, GNU date, zcat (for rotated logs)
**Backend details:** Reads `/var/log/dpkg.log` and rotated logs (`dpkg.log.*`, including `.gz`).
**Limitations:** Does not include Snap or Flatpak packages. Very old installs may be missing if logs were rotated or deleted.
**Usage:**
```
deb_installed [OPTION]
deb_installed days N
deb_installed on DATE
deb_installed this-week
deb_installed count [OPTION]
deb_installed since DATE [until DATE]
deb_installed package NAME
deb_installed package 'PATTERN'
deb_installed --refresh | --cache on|off | --cache | --help
```
| Option | Alias | Description |
| ------------------- | ----- | ----------------------------------------------------------- |
| `today` | `td` | Packages installed today |
| `yesterday` | `yd` | Packages installed yesterday |
| `days N` | | Packages installed in the last N days (today included) |
| `on DATE` | | Packages installed on an exact date β e.g. `on 2026-05-15` |
| `this-week` | `tw` | Packages installed this calendar week (Mon β today) |
| `last-week` | `lw` | Packages installed in the last 7 days |
| `this-month` | `tm` | Packages installed this calendar month |
| `last-month` | `lm` | Packages installed in the previous month |
| `per-day` | | Count packages per day |
| `per-week` | | Count packages per week |
| `package NAME` | | Full install history for an exact package name |
| `package 'PATTERN'` | | Full install history with glob β e.g. `'linux*'`, `'*lib*'` |
| Flag | Description |
| ------------- | ---------------------------------------------------------------- |
| `--refresh` | Clear and rebuild the cache on next call (caching stays enabled) |
| `--cache on` | Enable caching (default) |
| `--cache off` | Disable caching β dpkg logs are queried live on every call |
| `--cache` | Show current cache status |
The filter label is always repeated in the footer, so it remains visible without scrolling up. Package search shows install time to the minute. Cache status is shown on every listing. Output is automatically paged with `less` when it exceeds the terminal height.
**Examples:**
```
deb_installed tw
deb_installed lw
deb_installed days 3
deb_installed on 2026-05-15
deb_installed count this-week
deb_installed count days 5
deb_installed count on 2026-05-15
deb_installed count this-month
deb_installed since 2024-01-01 until 2024-02-01
deb_installed package cups
deb_installed package 'linux*'
deb_installed package '*lib*'
deb_installed --cache off
```
> β οΈ **Glob quoting:** always quote patterns containing `*` β without quotes, Fish expands them as filesystem globs before the function sees them. Exact names (`cups`) need no quotes.
---
### π `advanced_install_package`
A versatile package installer that supports multiple Linux distributions (Fedora, Manjaro/Arch, or Ubuntu/Debian) and provides informative feedback.
**Scope:** Cross-distro (Fedora / Arch / Debian-based)
**Optional Dependencies:** sudo, Internet connection
**Usage:**
```
advanced_install_package [package_name]
```
- Auto-detects your distro and installs the package
- If the package is already installed, shows a message without reinstalling
- If no package name is provided, prompts interactively
**Examples:**
```
advanced_install_package vim
advanced_install_package vim htop curl
advanced_install_package
```
---
### π§ `kver`
Display the current kernel version and optionally compare with the latest stable release.
**Scope:** Cross-distro (Fedora / Arch / Debian-based)
**Usage:**
```
kver [-c|--compare] [-h|--help]
```
| Flag | Description |
| --------------- | --------------------------------------------------------------- |
| `-c, --compare` | Fetch and compare with the latest stable kernel from kernel.org |
| `-h, --help` | Display help information |
- Version comparison is numeric per segment (avoids lexicographic issues e.g. `6.9` vs `6.10`)
- Fetch has a 5s timeout β falls back gracefully if kernel.org is unreachable
**Examples:**
```
$ kver
Current Kernel Version: 6.19.7-200.fc43.x86_64
$ kver -c
Current Kernel Version: 6.19.7-200.fc43.x86_64
Latest Stable Kernel: 6.19.8
βΉοΈ A newer kernel is available.
```
---
### π `fisher_update_select`
Interactive and non-interactive helper to update Fisher plugins selectively or in bulk.
**Scope:** Fish shell with Fisher plugin manager
**Requirements:** Fish shell, Fisher
**Usage:**
```
fisher_update_select
fisher_update_select --all
fisher_update_select --all --yes
```
| Flag | Description |
| ------- | ----------------------------------------------- |
| `--all` | Update all installed plugins, with confirmation |
| `--yes` | Skip confirmation prompt (useful for scripting) |
- Presents a numbered, alphabetically sorted list of installed plugins
- Accepts single, multiple (space-separated), or all (`a`) selections
- Safe exit without changes (`n` or `q`)
---
### π `generate_password`
Generate secure random passwords using Fish shell only β no external generators required.
**Scope:** Cross-distro (Fedora / Arch / Debian-based)
**Environment-aware:** Desktop-friendly, server-safe
**Features:**
- Cryptographically secure randomness via `/dev/urandom`
- Guaranteed character class coverage (digit + special character in every password)
- Optional ambiguous character exclusion (`--no-ambiguous`) for passwords meant to be typed manually
- Optional clipboard copy on Wayland desktops via `--clipboard` β auto-clears after timeout, survives terminal close via systemd
**Usage:**
```
generate_password [OPTIONS] [LENGTH] [COUNT]
generate_password
```
| Flag | Description |
| --------------------------- | ------------------------------------------------------------------ |
| `--clipboard` | Copy first password to clipboard (requires Wayland + wl-clipboard) |
| `--clipboard-timeout ` | Set clipboard clear timeout in seconds (default: 30, min: 1) |
| `--no-ambiguous` | Exclude visually similar characters (`0`,`O`,`l`,`1`,`\|`,`I`) |
| `-h, --help` | Show help |
**Examples:**
```
generate_password 20
generate_password 15 5
generate_password 32 2 --clipboard --clipboard-timeout 5
generate_password 16 3 --no-ambiguous
generate_password 16 1 --clipboard --no-ambiguous
```
---
## πΌοΈ Image Utilities
### πΌοΈ `resize_image`
Resize a single image or a batch of images in a directory by percentage or max dimension.
**Scope:** Cross-distro (Fedora / Arch / Debian-based)
**Dependencies:** `ImageMagick` (`magick` command, v7+)
**Usage:**
```
resize_image [size]
```
- `size β€ 100` β percentage resize
- `size > 100` β max dimension (preserves aspect ratio, never upscales)
- Output saved alongside originals with a `-resized` suffix
- Batch mode skips files already named `*-resized.*`
- Supported formats: jpg, jpeg, png, gif, webp, tiff, bmp
**Examples:**
```
resize_image photo.jpg 50
resize_image photo.jpg 1200
resize_image ~/Pictures/trip/ 800
```
---
## π¦ Archive Utilities
### π¦ `create_archive`
Create a compressed archive from a file or directory, with smart format detection and optional acceleration via `pigz` or `zstd`.
**Scope:** Cross-distro (Fedora / Arch / Debian-based)
**Dependencies:** `tar`; `zstd` for `.tar.zst` (default format); `pigz` optional for faster `.tar.gz`
**Usage:**
```
create_archive [OPTIONS] [output]
create_archive [OPTIONS] /
```
| Option | Description |
| ---------------- | ---------------------------------------------------------------------------- |
| `-f/--type TYPE` | Archive format: `tar` \| `tar.gz` \| `tgz` \| `tar.zst` (default: `tar.zst`) |
| `-F/--force` | Overwrite existing archive without prompting |
| `-h/--help` | Show help |
- If `output` is omitted, the archive is named after the source
- If `output` ends with `/`, it is treated as a destination directory
- Format is inferred from the output filename when `-f` is not given; falls back to `tar.zst`
- If `-f` is given alongside an output filename that already has a recognised extension, they must agree β a mismatch is an error
- Uses `pigz` for parallel `.tar.gz` compression when available
- Uses `zstd -T0` for multi-threaded `.tar.zst` compression
- On failure, partial output is removed automatically
- If the archive already exists and `--force` is not set, prompts interactively in a terminal (default: N); errors in non-interactive mode
**Examples:**
```
create_archive project
create_archive project backup.tar.gz
create_archive -f tar.gz project
create_archive --force project
create_archive project ~/backups/
```
---
### π¦ `extract_archive`
Extract an archive into its own directory, with atomic extraction and overwrite protection.
**Scope:** Cross-distro (Fedora / Arch / Debian-based)
**Optional dependencies:** `pigz` (faster `.tar.gz`), `zstd` (`.tar.zst`, `.zst`), `unrar` (`.rar`)
**Supported formats:** `tar`, `tar.gz`, `tgz`, `tar.bz2`, `tar.xz`, `tar.zst`, `zip`, `gz`, `bz2`, `xz`, `zst`, `rar`
**Usage:**
```
extract_archive [OPTIONS]
```
| Option | Description |
| ------------ | ----------------------------------------------------- |
| `-F/--force` | Overwrite existing output directory without prompting |
| `-q/--quiet` | Suppress output on success |
| `-h/--help` | Show help |
- Output directory is placed alongside the archive, named after it (extension stripped)
- Extraction is staged in a temp directory; the output directory only appears on success
- If the archive contains a single top-level directory with the same name as the archive, it is flattened to avoid double-nesting (e.g. `project.tar.gz` β `project/` not `project/project/`)
- On failure, both the temp directory and output directory are cleaned up
- If the output directory already exists and `--force` is not set, prompts interactively in a terminal (default: N); errors in non-interactive mode
- Format detection uses regex matching, not shell globs β works correctly with non-ASCII filenames regardless of locale
**Examples:**
```
extract_archive archive.tar.gz
extract_archive --force archive.tar.zst
extract_archive -q archive.zip
```
---
## π Fish Dev Utilities
### π¨ `fishfmt`
Format `.fish` files using `fish_indent`.
**Scope:** Fish shell
**Dependencies:** `fish_indent` (bundled with Fish), `find`
**Usage:**
```
fishfmt [OPTIONS] FILE|DIR [...]
```
| Option | Description |
| ----------------- | ----------------------------------------------- |
| `-r, --recursive` | Recurse into subdirectories when a DIR is given |
| `-h, --help` | Show this help |
- Formats a single `.fish` file, or all `.fish` files in a directory
- By default, directory mode is one level deep β use `-r` to recurse
- Rejects non-`.fish` files with a clear error rather than passing them to `fish_indent`
- Always prints a summary: files formatted and files skipped
**Examples:**
```
$ fishfmt myfunc.fish
β Formatted: myfunc.fish
Done β 1 formatted, 0 skipped
$ fishfmt ~/.config/fish/functions
β Formatted: /home/user/.config/fish/functions/myfunc.fish
β Formatted: /home/user/.config/fish/functions/kver.fish
Done β 2 formatted, 0 skipped
$ fishfmt -r ~/.config/fish/functions
β Formatted: /home/user/.config/fish/functions/myfunc.fish
β Formatted: /home/user/.config/fish/functions/subfolder/helper.fish
Done β 2 formatted, 0 skipped
$ fishfmt func_a.fish func_b.fish
β Formatted: func_a.fish
β Formatted: func_b.fish
Done β 2 formatted, 0 skipped
```
---
## π History & Shell UX Helpers
### π `search_history`
Search command history with optional interactive cleanup.
**Scope:** Cross-distro (Fedora / Arch / Debian-based)
**Usage:**
```fish
search_history [OPTIONS] [PATTERN]
```
| Flag | Description |
| --------------- | ----------------------------------------------- |
| `-c, --cleanup` | Offer to clean up matching entries after search |
| `-h, --help` | Show help |
- Uses ripgrep if available, falls back to grep
- Can be triggered with `CTRL+H`
- With `-c`: accepts `all`, `select`, direct numbers (e.g. `1 3 5`), ranges (e.g. `2-5`), mixed (e.g. `2-5 7`), or `n`/`q` to skip
- Overlapping ranges and numbers are deduplicated (e.g. `2-5 3` removes only 4 entries)
**Examples:**
```fish
search_history git
search_history -c 'git push'
search_history -c rpm
search_history -c cd # then: 2-5 7 to delete a range + extra entry
```
---
### π§Ή `cleanup_history`
Standalone interactive history cleanup tool.
**Scope:** Cross-distro (Fedora / Arch / Debian-based)
**Usage:**
```
cleanup_history PATTERN
```
- Displays matching entries with numeric indexes
- Accepts space-separated numbers, ranges (e.g. `4-7`), or any mix of both (e.g. `1 4-7 12`)
- Duplicates are silently deduplicated β `4-7 5` deletes 4 entries, not 5
- Accepts `all` to remove every match, or `n`/`q` to quit safely
- Uses exact, case-sensitive deletion to avoid accidental removals
**Examples:**
```
cleanup_history 'git add'
cleanup_history rpm
```
**Note:** For an integrated search + cleanup workflow, use `search_history -c` instead.
---
### π§Ή `clean_session_history`
Clear the current Fish shell session history with a visual countdown and final confirmation.
**Scope:** Cross-distro (Fedora / Arch / Debian-based)
**Usage:**
```
clean_session_history [OPTIONS]
```
| Flag | Description |
| -------------------- | ---------------------------------------------------- |
| `-y, --yes` | Clear immediately without countdown or prompt |
| `-w, --wait SECONDS` | Countdown duration in seconds (default: 10, max: 60) |
| `-h, --help` | Show help |
- Default flow: progress bar countdown, then a final confirmation prompt
- Press `Ctrl-C` at any time during the countdown to abort without clearing
- Requires `--yes` in non-interactive shells to prevent accidental clearing
- Only clears the current session β use `history clear` for all saved history
**Examples:**
```
clean_session_history # 10s countdown, then confirm
clean_session_history -y # clear instantly, no prompt
clean_session_history -w 5 # 5s countdown, then confirm
clean_session_history -w 5 -y # clear instantly (--yes takes precedence)
```
---
### π `inspect_function`
Search, display, and optionally edit Fish shell functions.
**Optional dependencies:** `bat` for paging, `fzf` for fuzzy selection
**Usage:**
```
inspect_function [FUNCTION_NAME or PATTERN]
```
- Uses fzf for selection when multiple matches are found, falls back to numbered list
- Long functions are displayed in a pager (`bat` or `less`)
- Can edit user-defined functions with `$EDITOR`
**Examples:**
```
inspect_function kver
inspect_function generate_password
```
---
**β¨οΈ Keybindings Summary:**
| Keybinding | Function |
| ---------- | ---------------- |
| `CTRL+H` | `search_history` |