{"id":43493680,"url":"https://github.com/fdel-ux64/fish-config","last_synced_at":"2026-05-29T06:01:12.836Z","repository":{"id":330776843,"uuid":"1122666524","full_name":"fdel-ux64/fish-config","owner":"fdel-ux64","description":"Personal Fish shell toolkit with cross-distro utilities, reusable helpers, and Fisher-ready functions.","archived":false,"fork":false,"pushed_at":"2026-05-17T05:43:22.000Z","size":265,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-17T07:43:39.581Z","etag":null,"topics":["cli","dotfiles","fish","fish-shell","fisher","linux","shell","shell-functions","unix"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fdel-ux64.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-25T08:38:27.000Z","updated_at":"2026-05-17T05:22:54.000Z","dependencies_parsed_at":"2026-04-20T07:02:38.758Z","dependency_job_id":null,"html_url":"https://github.com/fdel-ux64/fish-config","commit_stats":null,"previous_names":["fdel-ux64/fish-config"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/fdel-ux64/fish-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdel-ux64%2Ffish-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdel-ux64%2Ffish-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdel-ux64%2Ffish-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdel-ux64%2Ffish-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fdel-ux64","download_url":"https://codeload.github.com/fdel-ux64/fish-config/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdel-ux64%2Ffish-config/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33639055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","dotfiles","fish","fish-shell","fisher","linux","shell","shell-functions","unix"],"created_at":"2026-02-03T10:18:49.464Z","updated_at":"2026-05-29T06:01:12.828Z","avatar_url":"https://github.com/fdel-ux64.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐟 Personal Fish configuration\n\nA curated Fish shell toolkit with cross-distro utilities and reusable helpers.\n\nPrimarily maintained for personal use, but many utilities are **cross-distro compatible**, working on Arch, Debian/Ubuntu, and RPM-based Linux systems.\n\nNot intended as a fully stable public plugin suite, yet mature tools are documented and may be useful to others.\n\n\u003e 🐧 Works on Arch, Debian/Ubuntu, and RPM-based Linux distributions\n\n---\n\n## ✨ Highlights\n\n- **Multi-distro package inspection**: unified `installed_packages` for Arch, Debian/Ubuntu, and RPM systems\n- **Consistent package history** across distributions\n- **Interactive Fish shell helpers**: search \u0026 cleanup history with range selection, inspect functions\n- **Secure password generation** with environment-aware clipboard handling\n- **Cross-platform kernel version checks**\n- **Archive creation and extraction**: smart format detection, overwrite protection, and pigz/zstd acceleration\n- **Fish file formatting** via `fish_indent` with single-file and directory modes\n- **Fisher-compatible** functions, completions, and keybindings\n\n---\n\n## 📥 Installation\n\n### 🎣 Using [Fisher](https://github.com/jorgebucaran/fisher) (Recommended)\n\n```\nfisher install fdel-ux64/fish-config\n```\n\n---\n\n\u003e 🛠️ Cross-distro tools: Works on Arch, Debian/Ubuntu, and RPM-based Linux distributions\n\n### 📦 `installed_packages` (Unified dispatcher)\n\nAutomatically detects your distribution and calls the appropriate backend:\n\n- `rpm_installed` — RPM-based systems (Fedora, RHEL, CentOS…)\n- `deb_installed` — Debian-based systems (Debian, Ubuntu, Mint, Pop!_OS…)\n- `arch_installed` — Arch-based systems (Arch, Manjaro, EndeavourOS…)\n\nSingle 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.\n\n**Usage:**\n\n```\ninstalled_packages [OPTION]\ninstalled_packages days N\ninstalled_packages on DATE\ninstalled_packages this-week\ninstalled_packages count [OPTION]\ninstalled_packages since DATE [until DATE]\ninstalled_packages package NAME\ninstalled_packages package 'PATTERN'\ninstalled_packages --refresh\ninstalled_packages --backend\n```\n\n| Option              | Alias | Description                                                |\n| ------------------- | ----- | ---------------------------------------------------------- |\n| `today`             | `td`  | Packages installed today                                   |\n| `yesterday`         | `yd`  | Packages installed yesterday                               |\n| `days N`            |       | Packages installed in the last N days (today included)     |\n| `on DATE`           |       | Packages installed on an exact date — e.g. `on 2026-05-15` |\n| `this-week`         | `tw`  | Packages installed this calendar week (Mon → today)        |\n| `last-week`         | `lw`  | Packages installed in the last 7 days                      |\n| `this-month`        | `tm`  | Packages installed this calendar month                     |\n| `last-month`        | `lm`  | Packages installed in the previous month                   |\n| `per-day`           |       | Count packages per day                                     |\n| `per-week`          |       | Count packages per week                                    |\n| `package NAME`      |       | Full install history for an exact package name             |\n| `package 'PATTERN'` |       | Full install history with glob — e.g. `'kern*'`, `'*lib*'` |\n\nAliases are case-insensitive (TD, Td, etc.).\n\n| Flag        | Description                          |\n| ----------- | ------------------------------------ |\n| `--backend` | Show detected backend                |\n| `--refresh` | Refresh cache (delegated to backend) |\n\n**Examples:**\n\n```\ninstalled_packages today\ninstalled_packages days 3\ninstalled_packages tw\ninstalled_packages lw\ninstalled_packages on 2026-05-15\ninstalled_packages count this-week\ninstalled_packages count last-week\ninstalled_packages count on 2026-05-15\ninstalled_packages since 2026-02-01\ninstalled_packages package cups\ninstalled_packages package 'kern*'\ninstalled_packages --backend\n```\n\n\u003e ⚠️ **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.\n\n---\n\n### 📦 `rpm_installed`\n\nBackend for RPM-based systems. Also available as a standalone plugin:\n\u003chttps://github.com/fdel-ux64/fish-rpm-installed\u003e\n\nLists installed RPM packages by installation date, grouped by day, with caching for faster repeated queries. Ensures consistent date parsing using the US English locale.\n\n**Scope:** RPM-based distributions (Fedora, RHEL, CentOS…)\n\n**Usage:**\n\n```\nrpm_installed [OPTION]\nrpm_installed days N\nrpm_installed on DATE\nrpm_installed this-week\nrpm_installed count [OPTION]\nrpm_installed since DATE [until DATE]\nrpm_installed package NAME\nrpm_installed package 'PATTERN'\nrpm_installed --refresh | --cache on|off | --cache | --help\n```\n\n| Option              | Alias | Description                                                |\n| ------------------- | ----- | ---------------------------------------------------------- |\n| `today`             | `td`  | Packages installed today                                   |\n| `yesterday`         | `yd`  | Packages installed yesterday                               |\n| `days N`            |       | Packages installed in the last N days (today included)     |\n| `on DATE`           |       | Packages installed on an exact date — e.g. `on 2026-05-15` |\n| `this-week`         | `tw`  | Packages installed this calendar week (Mon → today)        |\n| `last-week`         | `lw`  | Packages installed in the last 7 days                      |\n| `this-month`        | `tm`  | Packages installed this calendar month                     |\n| `last-month`        | `lm`  | Packages installed in the previous month                   |\n| `per-day`           |       | Count packages per day                                     |\n| `per-week`          |       | Count packages per week                                    |\n| `package NAME`      |       | Full install history for an exact package name             |\n| `package 'PATTERN'` |       | Full install history with glob — e.g. `'kern*'`, `'*lib*'` |\n\n| Flag          | Description                                                      |\n| ------------- | ---------------------------------------------------------------- |\n| `--refresh`   | Clear and rebuild the cache on next call (caching stays enabled) |\n| `--cache on`  | Enable caching (default)                                         |\n| `--cache off` | Disable caching — RPM is queried live on every call              |\n| `--cache`     | Show current cache status                                        |\n\n**Output — date range query:**\n\n```\n    📦 Installed packages — last-week\n\n 📆 Wed 2026-03-18  (5 packages)\n    onnx-libs-1.17.0-12.fc43.x86_64\n    zlib-ng-2.3.3-2.fc43.x86_64\n 📆 Thu 2026-03-19  (9 packages)\n    firefox-148.0.2-2.fc43.x86_64\n    libtasn1-4.21.0-1.fc43.x86_64\n    ...\n ────────────────────────────────────\n 🔢 Total: 14 packages — last-week\n 💾 Cache: session cache\n```\n\n**Output — package search:**\n\n```\n    📦 Package history — kern*\n\n 📆 Sat 2026-05-09  (5 packages)\n    09:30 CEST  kernel-core-7.0.4-200.fc44.x86_64\n    09:30 CEST  kernel-modules-7.0.4-200.fc44.x86_64\n    09:30 CEST  kernel-7.0.4-200.fc44.x86_64\n    ...\n 📆 Thu 2026-05-14  (6 packages)\n    10:50 CEST  kernel-core-7.0.6-200.fc44.x86_64\n    10:50 CEST  kernel-7.0.6-200.fc44.x86_64\n    ...\n ────────────────────────────────────\n 🔢 11 install records matching 'kern*'\n 💾 Cache: session cache\n```\n\nThe 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.\n\n**Examples:**\n\n```\nrpm_installed tw\nrpm_installed lw\nrpm_installed days 3\nrpm_installed on 2026-05-15\nrpm_installed count this-week\nrpm_installed count days 5\nrpm_installed count on 2026-05-15\nrpm_installed count this-month\nrpm_installed since 2025-12-16 until 2025-12-22\nrpm_installed package cups\nrpm_installed package 'kern*'\nrpm_installed package 'python3*'\nrpm_installed --cache off\n```\n\n\u003e ⚠️ **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.\n\n---\n\n### 📦 `arch_installed`\n\nBackend for Arch-based systems. Equivalent of `rpm_installed`, using `expac` as the data source.\n\n**Scope:** Arch-based distributions (Arch Linux, Manjaro, EndeavourOS…)\n\n**Dependencies:** `expac`, Fish shell, GNU date\n\n\u003e 💡 If `expac` is not installed, `arch_installed` will prompt to install it via `sudo pacman -S expac` — no need to run it manually first.\n\n**Usage:**\n\n```\narch_installed [OPTION]\narch_installed days N\narch_installed on DATE\narch_installed this-week\narch_installed count [OPTION]\narch_installed since DATE [until DATE]\narch_installed package NAME\narch_installed package 'PATTERN'\narch_installed --refresh | --cache on|off | --cache | --help\n```\n\n| Option              | Alias | Description                                                 |\n| ------------------- | ----- | ----------------------------------------------------------- |\n| `today`             | `td`  | Packages installed today                                    |\n| `yesterday`         | `yd`  | Packages installed yesterday                                |\n| `days N`            |       | Packages installed in the last N days (today included)      |\n| `on DATE`           |       | Packages installed on an exact date — e.g. `on 2026-05-15`  |\n| `this-week`         | `tw`  | Packages installed this calendar week (Mon → today)         |\n| `last-week`         | `lw`  | Packages installed in the last 7 days                       |\n| `this-month`        | `tm`  | Packages installed this calendar month                      |\n| `last-month`        | `lm`  | Packages installed in the previous month                    |\n| `per-day`           |       | Count packages per day                                      |\n| `per-week`          |       | Count packages per week                                     |\n| `package NAME`      |       | Full install history for an exact package name              |\n| `package 'PATTERN'` |       | Full install history with glob — e.g. `'linux*'`, `'*lib*'` |\n\n| Flag          | Description                                                      |\n| ------------- | ---------------------------------------------------------------- |\n| `--refresh`   | Clear and rebuild the cache on next call (caching stays enabled) |\n| `--cache on`  | Enable caching (default)                                         |\n| `--cache off` | Disable caching — expac is queried live on every call            |\n| `--cache`     | Show current cache status                                        |\n\nThe 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.\n\n**Examples:**\n\n```\narch_installed tw\narch_installed lw\narch_installed days 3\narch_installed on 2026-05-15\narch_installed count this-week\narch_installed count days 5\narch_installed count on 2026-05-15\narch_installed count this-month\narch_installed since 2024-01-01 until 2024-02-01\narch_installed package linux\narch_installed package 'linux*'\narch_installed package '*lib*'\narch_installed --cache off\n```\n\n\u003e ⚠️ **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.\n\n---\n\n### 📦 `deb_installed`\n\nBackend for Debian-based systems. Equivalent of `rpm_installed`, reconstructing install timestamps from dpkg logs.\n\n**Scope:** Debian-based distributions (Ubuntu, Debian, Linux Mint, Pop!_OS…)\n\n**Dependencies:** Fish shell, awk, GNU date, zcat (for rotated logs)\n\n**Backend details:** Reads `/var/log/dpkg.log` and rotated logs (`dpkg.log.*`, including `.gz`).\n\n**Limitations:** Does not include Snap or Flatpak packages. Very old installs may be missing if logs were rotated or deleted.\n\n**Usage:**\n\n```\ndeb_installed [OPTION]\ndeb_installed days N\ndeb_installed on DATE\ndeb_installed this-week\ndeb_installed count [OPTION]\ndeb_installed since DATE [until DATE]\ndeb_installed package NAME\ndeb_installed package 'PATTERN'\ndeb_installed --refresh | --cache on|off | --cache | --help\n```\n\n| Option              | Alias | Description                                                 |\n| ------------------- | ----- | ----------------------------------------------------------- |\n| `today`             | `td`  | Packages installed today                                    |\n| `yesterday`         | `yd`  | Packages installed yesterday                                |\n| `days N`            |       | Packages installed in the last N days (today included)      |\n| `on DATE`           |       | Packages installed on an exact date — e.g. `on 2026-05-15`  |\n| `this-week`         | `tw`  | Packages installed this calendar week (Mon → today)         |\n| `last-week`         | `lw`  | Packages installed in the last 7 days                       |\n| `this-month`        | `tm`  | Packages installed this calendar month                      |\n| `last-month`        | `lm`  | Packages installed in the previous month                    |\n| `per-day`           |       | Count packages per day                                      |\n| `per-week`          |       | Count packages per week                                     |\n| `package NAME`      |       | Full install history for an exact package name              |\n| `package 'PATTERN'` |       | Full install history with glob — e.g. `'linux*'`, `'*lib*'` |\n\n| Flag          | Description                                                      |\n| ------------- | ---------------------------------------------------------------- |\n| `--refresh`   | Clear and rebuild the cache on next call (caching stays enabled) |\n| `--cache on`  | Enable caching (default)                                         |\n| `--cache off` | Disable caching — dpkg logs are queried live on every call       |\n| `--cache`     | Show current cache status                                        |\n\nThe 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.\n\n**Examples:**\n\n```\ndeb_installed tw\ndeb_installed lw\ndeb_installed days 3\ndeb_installed on 2026-05-15\ndeb_installed count this-week\ndeb_installed count days 5\ndeb_installed count on 2026-05-15\ndeb_installed count this-month\ndeb_installed since 2024-01-01 until 2024-02-01\ndeb_installed package cups\ndeb_installed package 'linux*'\ndeb_installed package '*lib*'\ndeb_installed --cache off\n```\n\n\u003e ⚠️ **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.\n\n---\n\n### 🚀 `advanced_install_package`\n\nA versatile package installer that supports multiple Linux distributions (Fedora, Manjaro/Arch, or Ubuntu/Debian) and provides informative feedback.\n\n**Scope:** Cross-distro (Fedora / Arch / Debian-based)\n\n**Optional Dependencies:** sudo, Internet connection\n\n**Usage:**\n\n```\nadvanced_install_package [package_name]\n```\n\n- Auto-detects your distro and installs the package\n- If the package is already installed, shows a message without reinstalling\n- If no package name is provided, prompts interactively\n\n**Examples:**\n\n```\nadvanced_install_package vim\nadvanced_install_package vim htop curl\nadvanced_install_package\n```\n\n---\n\n### 🐧 `kver`\n\nDisplay the current kernel version and optionally compare with the latest stable release.\n\n**Scope:** Cross-distro (Fedora / Arch / Debian-based)\n\n**Usage:**\n\n```\nkver [-c|--compare] [-h|--help]\n```\n\n| Flag            | Description                                                     |\n| --------------- | --------------------------------------------------------------- |\n| `-c, --compare` | Fetch and compare with the latest stable kernel from kernel.org |\n| `-h, --help`    | Display help information                                        |\n\n- Version comparison is numeric per segment (avoids lexicographic issues e.g. `6.9` vs `6.10`)\n- Fetch has a 5s timeout — falls back gracefully if kernel.org is unreachable\n\n**Examples:**\n\n```\n$ kver\nCurrent Kernel Version: 6.19.7-200.fc43.x86_64\n\n$ kver -c\nCurrent Kernel Version: 6.19.7-200.fc43.x86_64\nLatest Stable Kernel:   6.19.8\nℹ️  A newer kernel is available.\n```\n\n---\n\n### 🔄 `fisher_update_select`\n\nInteractive and non-interactive helper to update Fisher plugins selectively or in bulk.\n\n**Scope:** Fish shell with Fisher plugin manager\n\n**Requirements:** Fish shell, Fisher\n\n**Usage:**\n\n```\nfisher_update_select\nfisher_update_select --all\nfisher_update_select --all --yes\n```\n\n| Flag    | Description                                     |\n| ------- | ----------------------------------------------- |\n| `--all` | Update all installed plugins, with confirmation |\n| `--yes` | Skip confirmation prompt (useful for scripting) |\n\n- Presents a numbered, alphabetically sorted list of installed plugins\n- Accepts single, multiple (space-separated), or all (`a`) selections\n- Safe exit without changes (`n` or `q`)\n\n---\n\n### 🔐 `generate_password`\n\nGenerate secure random passwords using Fish shell only — no external generators required.\n\n**Scope:** Cross-distro (Fedora / Arch / Debian-based)\n**Environment-aware:** Desktop-friendly, server-safe\n\n**Features:**\n\n- Cryptographically secure randomness via `/dev/urandom`\n- Guaranteed character class coverage (digit + special character in every password)\n- Optional ambiguous character exclusion (`--no-ambiguous`) for passwords meant to be typed manually\n- Optional clipboard copy on Wayland desktops via `--clipboard` — auto-clears after timeout, survives terminal close via systemd\n\n**Usage:**\n\n```\ngenerate_password [OPTIONS] [LENGTH] [COUNT]\ngenerate_password\n```\n\n| Flag                        | Description                                                        |\n| --------------------------- | ------------------------------------------------------------------ |\n| `--clipboard`               | Copy first password to clipboard (requires Wayland + wl-clipboard) |\n| `--clipboard-timeout \u003csec\u003e` | Set clipboard clear timeout in seconds (default: 30, min: 1)       |\n| `--no-ambiguous`            | Exclude visually similar characters (`0`,`O`,`l`,`1`,`\\|`,`I`)     |\n| `-h, --help`                | Show help                                                          |\n\n**Examples:**\n\n```\ngenerate_password 20\ngenerate_password 15 5\ngenerate_password 32 2 --clipboard --clipboard-timeout 5\ngenerate_password 16 3 --no-ambiguous\ngenerate_password 16 1 --clipboard --no-ambiguous\n```\n\n---\n\n## 🖼️ Image Utilities\n\n### 🖼️ `resize_image`\n\nResize a single image or a batch of images in a directory by percentage or max dimension.\n\n**Scope:** Cross-distro (Fedora / Arch / Debian-based)\n\n**Dependencies:** `ImageMagick` (`magick` command, v7+)\n\n**Usage:**\n\n```\nresize_image \u003cimage|dir\u003e [size]\n```\n\n- `size ≤ 100` → percentage resize\n- `size \u003e 100` → max dimension (preserves aspect ratio, never upscales)\n- Output saved alongside originals with a `-resized` suffix\n- Batch mode skips files already named `*-resized.*`\n- Supported formats: jpg, jpeg, png, gif, webp, tiff, bmp\n\n**Examples:**\n\n```\nresize_image photo.jpg 50\nresize_image photo.jpg 1200\nresize_image ~/Pictures/trip/ 800\n```\n\n---\n\n## 📦 Archive Utilities\n\n### 📦 `create_archive`\n\nCreate a compressed archive from a file or directory, with smart format detection and optional acceleration via `pigz` or `zstd`.\n\n**Scope:** Cross-distro (Fedora / Arch / Debian-based)\n\n**Dependencies:** `tar`; `zstd` for `.tar.zst` (default format); `pigz` optional for faster `.tar.gz`\n\n**Usage:**\n\n```\ncreate_archive [OPTIONS] \u003csource\u003e [output]\ncreate_archive [OPTIONS] \u003csource\u003e \u003cdest-dir\u003e/\n```\n\n| Option           | Description                                                                  |\n| ---------------- | ---------------------------------------------------------------------------- |\n| `-f/--type TYPE` | Archive format: `tar` \\| `tar.gz` \\| `tgz` \\| `tar.zst` (default: `tar.zst`) |\n| `-F/--force`     | Overwrite existing archive without prompting                                 |\n| `-h/--help`      | Show help                                                                    |\n\n- If `output` is omitted, the archive is named after the source\n- If `output` ends with `/`, it is treated as a destination directory\n- Format is inferred from the output filename when `-f` is not given; falls back to `tar.zst`\n- If `-f` is given alongside an output filename that already has a recognised extension, they must agree — a mismatch is an error\n- Uses `pigz` for parallel `.tar.gz` compression when available\n- Uses `zstd -T0` for multi-threaded `.tar.zst` compression\n- On failure, partial output is removed automatically\n- If the archive already exists and `--force` is not set, prompts interactively in a terminal (default: N); errors in non-interactive mode\n\n**Examples:**\n\n```\ncreate_archive project\ncreate_archive project backup.tar.gz\ncreate_archive -f tar.gz project\ncreate_archive --force project\ncreate_archive project ~/backups/\n```\n\n---\n\n### 📦 `extract_archive`\n\nExtract an archive into its own directory, with atomic extraction and overwrite protection.\n\n**Scope:** Cross-distro (Fedora / Arch / Debian-based)\n\n**Optional dependencies:** `pigz` (faster `.tar.gz`), `zstd` (`.tar.zst`, `.zst`), `unrar` (`.rar`)\n\n**Supported formats:** `tar`, `tar.gz`, `tgz`, `tar.bz2`, `tar.xz`, `tar.zst`, `zip`, `gz`, `bz2`, `xz`, `zst`, `rar`\n\n**Usage:**\n\n```\nextract_archive [OPTIONS] \u003carchive\u003e\n```\n\n| Option       | Description                                           |\n| ------------ | ----------------------------------------------------- |\n| `-F/--force` | Overwrite existing output directory without prompting |\n| `-q/--quiet` | Suppress output on success                            |\n| `-h/--help`  | Show help                                             |\n\n- Output directory is placed alongside the archive, named after it (extension stripped)\n- Extraction is staged in a temp directory; the output directory only appears on success\n- 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/`)\n- On failure, both the temp directory and output directory are cleaned up\n- If the output directory already exists and `--force` is not set, prompts interactively in a terminal (default: N); errors in non-interactive mode\n- Format detection uses regex matching, not shell globs — works correctly with non-ASCII filenames regardless of locale\n\n**Examples:**\n\n```\nextract_archive archive.tar.gz\nextract_archive --force archive.tar.zst\nextract_archive -q archive.zip\n```\n\n---\n\n## 🐟 Fish Dev Utilities\n\n### 🎨 `fishfmt`\n\nFormat `.fish` files using `fish_indent`.\n\n**Scope:** Fish shell\n\n**Dependencies:** `fish_indent` (bundled with Fish), `find`\n\n**Usage:**\n\n```\nfishfmt [OPTIONS] FILE|DIR [...]\n```\n\n| Option            | Description                                     |\n| ----------------- | ----------------------------------------------- |\n| `-r, --recursive` | Recurse into subdirectories when a DIR is given |\n| `-h, --help`      | Show this help                                  |\n\n- Formats a single `.fish` file, or all `.fish` files in a directory\n- By default, directory mode is one level deep — use `-r` to recurse\n- Rejects non-`.fish` files with a clear error rather than passing them to `fish_indent`\n- Always prints a summary: files formatted and files skipped\n\n**Examples:**\n\n```\n$ fishfmt myfunc.fish\n ✔ Formatted: myfunc.fish\n Done — 1 formatted, 0 skipped\n\n$ fishfmt ~/.config/fish/functions\n ✔ Formatted: /home/user/.config/fish/functions/myfunc.fish\n ✔ Formatted: /home/user/.config/fish/functions/kver.fish\n Done — 2 formatted, 0 skipped\n\n$ fishfmt -r ~/.config/fish/functions\n ✔ Formatted: /home/user/.config/fish/functions/myfunc.fish\n ✔ Formatted: /home/user/.config/fish/functions/subfolder/helper.fish\n Done — 2 formatted, 0 skipped\n\n$ fishfmt func_a.fish func_b.fish\n ✔ Formatted: func_a.fish\n ✔ Formatted: func_b.fish\n Done — 2 formatted, 0 skipped\n```\n\n---\n\n## 📜 History \u0026 Shell UX Helpers\n\n### 🔍 `search_history`\n\nSearch command history with optional interactive cleanup.\n\n**Scope:** Cross-distro (Fedora / Arch / Debian-based)\n\n**Usage:**\n\n```fish\nsearch_history [OPTIONS] [PATTERN]\n```\n\n| Flag            | Description                                     |\n| --------------- | ----------------------------------------------- |\n| `-c, --cleanup` | Offer to clean up matching entries after search |\n| `-h, --help`    | Show help                                       |\n\n- Uses ripgrep if available, falls back to grep\n- Can be triggered with `CTRL+H`\n- 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\n- Overlapping ranges and numbers are deduplicated (e.g. `2-5 3` removes only 4 entries)\n\n**Examples:**\n\n```fish\nsearch_history git\nsearch_history -c 'git push'\nsearch_history -c rpm\nsearch_history -c cd      # then: 2-5 7  to delete a range + extra entry\n```\n\n---\n\n### 🧹 `cleanup_history`\n\nStandalone interactive history cleanup tool.\n\n**Scope:** Cross-distro (Fedora / Arch / Debian-based)\n\n**Usage:**\n\n```\ncleanup_history PATTERN\n```\n\n- Displays matching entries with numeric indexes\n- Accepts space-separated numbers, ranges (e.g. `4-7`), or any mix of both (e.g. `1 4-7 12`)\n- Duplicates are silently deduplicated — `4-7 5` deletes 4 entries, not 5\n- Accepts `all` to remove every match, or `n`/`q` to quit safely\n- Uses exact, case-sensitive deletion to avoid accidental removals\n\n**Examples:**\n\n```\ncleanup_history 'git add'\ncleanup_history rpm\n```\n\n**Note:** For an integrated search + cleanup workflow, use `search_history -c` instead.\n\n---\n\n### 🧹 `clean_session_history`\n\nClear the current Fish shell session history with a visual countdown and final confirmation.\n\n**Scope:** Cross-distro (Fedora / Arch / Debian-based)\n\n**Usage:**\n\n```\nclean_session_history [OPTIONS]\n```\n\n| Flag                 | Description                                          |\n| -------------------- | ---------------------------------------------------- |\n| `-y, --yes`          | Clear immediately without countdown or prompt        |\n| `-w, --wait SECONDS` | Countdown duration in seconds (default: 10, max: 60) |\n| `-h, --help`         | Show help                                            |\n\n- Default flow: progress bar countdown, then a final confirmation prompt\n- Press `Ctrl-C` at any time during the countdown to abort without clearing\n- Requires `--yes` in non-interactive shells to prevent accidental clearing\n- Only clears the current session — use `history clear` for all saved history\n\n**Examples:**\n\n```\nclean_session_history            # 10s countdown, then confirm\nclean_session_history -y         # clear instantly, no prompt\nclean_session_history -w 5       # 5s countdown, then confirm\nclean_session_history -w 5 -y    # clear instantly (--yes takes precedence)\n```\n\n---\n\n### 🔎 `inspect_function`\n\nSearch, display, and optionally edit Fish shell functions.\n\n**Optional dependencies:** `bat` for paging, `fzf` for fuzzy selection\n\n**Usage:**\n\n```\ninspect_function [FUNCTION_NAME or PATTERN]\n```\n\n- Uses fzf for selection when multiple matches are found, falls back to numbered list\n- Long functions are displayed in a pager (`bat` or `less`)\n- Can edit user-defined functions with `$EDITOR`\n\n**Examples:**\n\n```\ninspect_function kver\ninspect_function generate_password\n```\n\n---\n\n**⌨️ Keybindings Summary:**\n\n| Keybinding | Function         |\n| ---------- | ---------------- |\n| `CTRL+H`   | `search_history` |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdel-ux64%2Ffish-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffdel-ux64%2Ffish-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdel-ux64%2Ffish-config/lists"}