feat(yt-dlp): wrapper with sane defaults + fish-deps shadow-detection fix #61
Reference in New Issue
Block a user
Delete Branch "yt-dlp-wrapper-and-deps-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds a
yt-dlpwrapper function with sensible embedding/SponsorBlock defaults, registersyt-dlpas a recommended dependency, and fixes a latentfish-depsbug where wrapper functions masked missing binaries.Excludes
completions/copilot.fish— that ships separately.Commits (logical blocks)
feat(yt-dlp)—functions/yt-dlp.fishshadowsyt-dlpand 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=valueform (--sponsorblock-remove=...), or the global--no-sponsorblockkill. User args go last so an explicit flag wins on precedence. C1 opinionated-alias guarded → falls back to barecommand yt-dlpwhen disabled.--helppasses through. Registered as arec-tier dependency in the fish-deps catalog; documented in the SSOT (§5.13) and index.fix(fish-deps)— status/install/update resolved catalog entries withtype -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 bothinstallandupdate. Switched the catalog-bin probes tocommand -q/command -s(PATH only). PM/build-tool probes and thefishercheck (a fish function) intentionally keeptype -q.chore(gitignore)— ignore/.cache_ggshield.Manual Verification
yt-dlp <id>injects all four defaults (verify with--print-trafficoff, 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 defaultall.yt-dlp --no-sponsorblock <id>drops the default--sponsorblock-remove all.set -U __fish_config_op_aliases 0→yt-dlp <id>passes straight through with no injected flags; unset the var afterward.fish-deps(status) showsyt-dlpunder Recommended with its real binary path (/usr/bin/yt-dlp), not afunctions/*.fishpath.rgbinary (or test on a host without it):fish-depsreportsrgas not installed despite therg.fishwrapper being present.git statusshowscompletions/copilot.fishstill untracked (intentionally excluded).