feat(yt-dlp): wrapper with sane defaults + fish-deps shadow-detection fix #61

Merged
rootiest merged 3 commits from yt-dlp-wrapper-and-deps-fix into main 2026-06-22 04:57:13 +00:00
Owner

Summary

Adds a yt-dlp wrapper function with sensible embedding/SponsorBlock defaults, registers yt-dlp as a recommended dependency, and fixes a latent fish-deps bug where wrapper functions masked missing binaries.

Excludes completions/copilot.fish — that ships separately.

Commits (logical blocks)

  1. feat(yt-dlp)functions/yt-dlp.fish shadows yt-dlp and prepends --sponsorblock-remove all --embed-subs --embed-metadata --embed-thumbnail. Each default is suppressed when the user already passes that flag, its alias (--add-metadata), its negation (--no-embed-thumbnail), the --opt=value form (--sponsorblock-remove=...), or the global --no-sponsorblock kill. User args go last so an explicit flag wins on precedence. C1 opinionated-alias guarded → falls back to bare command yt-dlp when disabled. --help passes through. Registered as a rec-tier dependency in the fish-deps catalog; documented in the SSOT (§5.13) and index.

  2. fix(fish-deps) — status/install/update resolved catalog entries with type -q, which also matches wrapper functions shadowing a tool name (rg, rm, yt-dlp). A shadowed-but-uninstalled tool was reported "installed", and skipped by both install and update. Switched the catalog-bin probes to command -q/command -s (PATH only). PM/build-tool probes and the fisher check (a fish function) intentionally keep type -q.

  3. chore(gitignore) — ignore /.cache_ggshield.

Manual Verification

  • yt-dlp <id> injects all four defaults (verify with --print-traffic off, or a dry -s --print filename).
  • yt-dlp --no-embed-thumbnail <id> does not add --embed-thumbnail.
  • yt-dlp --add-metadata <id> does not add --embed-metadata (alias respected).
  • yt-dlp --sponsorblock-remove=sponsor <id> keeps your value, drops the default all.
  • yt-dlp --no-sponsorblock <id> drops the default --sponsorblock-remove all.
  • set -U __fish_config_op_aliases 0yt-dlp <id> passes straight through with no injected flags; unset the var afterward.
  • fish-deps (status) shows yt-dlp under Recommended with its real binary path (/usr/bin/yt-dlp), not a functions/*.fish path.
  • Temporarily rename the rg binary (or test on a host without it): fish-deps reports rg as not installed despite the rg.fish wrapper being present.
  • git status shows completions/copilot.fish still untracked (intentionally excluded).
## Summary Adds a `yt-dlp` wrapper function with sensible embedding/SponsorBlock defaults, registers `yt-dlp` as a recommended dependency, and fixes a latent `fish-deps` bug where wrapper functions masked missing binaries. Excludes `completions/copilot.fish` — that ships separately. ### Commits (logical blocks) 1. **`feat(yt-dlp)`** — `functions/yt-dlp.fish` shadows `yt-dlp` and prepends `--sponsorblock-remove all --embed-subs --embed-metadata --embed-thumbnail`. Each default is suppressed when the user already passes that flag, its alias (`--add-metadata`), its negation (`--no-embed-thumbnail`), the `--opt=value` form (`--sponsorblock-remove=...`), or the global `--no-sponsorblock` kill. User args go last so an explicit flag wins on precedence. C1 opinionated-alias guarded → falls back to bare `command yt-dlp` when disabled. `--help` passes through. Registered as a `rec`-tier dependency in the fish-deps catalog; documented in the SSOT (§5.13) and index. 2. **`fix(fish-deps)`** — status/install/update resolved catalog entries with `type -q`, which also matches wrapper functions shadowing a tool name (`rg`, `rm`, `yt-dlp`). A shadowed-but-uninstalled tool was reported "installed", and skipped by both `install` and `update`. Switched the catalog-bin probes to `command -q`/`command -s` (PATH only). PM/build-tool probes and the `fisher` check (a fish function) intentionally keep `type -q`. 3. **`chore(gitignore)`** — ignore `/.cache_ggshield`. ## Manual Verification - [x] `yt-dlp <id>` injects all four defaults (verify with `--print-traffic` off, or a dry `-s --print filename`). - [x] `yt-dlp --no-embed-thumbnail <id>` does **not** add `--embed-thumbnail`. - [x] `yt-dlp --add-metadata <id>` does **not** add `--embed-metadata` (alias respected). - [x] `yt-dlp --sponsorblock-remove=sponsor <id>` keeps your value, drops the default `all`. - [x] `yt-dlp --no-sponsorblock <id>` drops the default `--sponsorblock-remove all`. - [x] `set -U __fish_config_op_aliases 0` → `yt-dlp <id>` passes straight through with no injected flags; unset the var afterward. - [x] `fish-deps` (status) shows `yt-dlp` under Recommended with its real binary path (`/usr/bin/yt-dlp`), not a `functions/*.fish` path. - [x] Temporarily rename the `rg` binary (or test on a host without it): `fish-deps` reports `rg` as **not installed** despite the `rg.fish` wrapper being present. - [x] `git status` shows `completions/copilot.fish` still untracked (intentionally excluded).
rootiest added 3 commits 2026-06-22 04:56:15 +00:00
Add functions/yt-dlp.fish, shadowing yt-dlp to prepend sane defaults
(--sponsorblock-remove all, --embed-subs, --embed-metadata,
--embed-thumbnail). Each default is suppressed when the user already
passes that flag, its alias (--add-metadata), its negation
(--no-embed-thumbnail), the --opt=value form (--sponsorblock-remove=...),
or the global --no-sponsorblock kill. User args pass through last so an
explicit flag wins on precedence. Gated as a C1 opinionated alias;
falls back to bare `command yt-dlp` when disabled.

Register yt-dlp as a recommended (rec tier) dependency in the fish-deps
catalog and document the function (§5.13) and dependency in the SSOT
and index.
Status, install, and update resolved catalog entries with `type -q`,
which also matches wrapper functions that shadow a tool name (rg, rm,
yt-dlp). A shadowed-but-uninstalled tool was reported "installed",
skipped by `install`, and skipped by `update`. Switch these catalog-bin
probes to `command -q`/`command -s` (PATH only). PM/build-tool probes
(cargo, uv, paru, yay, ...) and the fisher check (a fish function) keep
`type -q`.
Exclude /.cache_ggshield, the local GitGuardian secret-scanner cache.
rootiest merged commit 29637799f6 into main 2026-06-22 04:57:13 +00:00
rootiest deleted branch yt-dlp-wrapper-and-deps-fix 2026-06-22 04:57:13 +00:00
Sign in to join this conversation.