feat(functions): port key-crypt to a fish function #158
No Reviewers
Labels
Clear labels
Area/CI
Area/Completions
Area/Components
Area/Config
Area/Docs
Area/Functions
Area/Integrations
Area/Prompt & Theme
Area/Scripts
Area/Tests
Compat/Breaking
Kind/Bug
Kind/Chore
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Performance
Kind/Refactor
Kind/Security
Kind/Testing
good first issue
help wanted
.github/workflows and repository automation
completions/ - tab-completion scripts
The opinionated-component system (C1-C6)
config.fish and conf.d/ - startup and environment
docs/manual/ and the generated manual, man page, and site
functions/ - user-facing functions and helpers
integrations/ - third-party tool wiring
themes/ and prompt appearance
scripts/ - standalone helper scripts
tests/ - the syntax lint and functional suite
Breaking change that won't be backward compatible
Something is not working
Tooling, dependencies, and housekeeping
Documentation changes
Improve existing functionality
New functionality
Makes existing behavior faster or lighter
Restructures code without changing behavior
This is security issue
Issue or pull request related to testing
Well-scoped and self-contained; a good place to start
Maintainer is looking for someone to pick this up
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Medium
3
The priority is medium
Priority
Low
4
The priority is low
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
Status
Abandoned
3
Somebody has started to work on this but abandoned work
Milestone
No items
No Milestone
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: rootiest/fish-config#158
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
key-cryptin from~/scriptsasfunctions/key-crypt.fishinstead of a standalone--no-configscript.exit-based control flow toreturn; drops thefish_exit/signal traps (they'd hijack the whole interactive shell's Ctrl-C once loaded) in favor of an outer wrapper that cleans up the temp file and scratch globals after every call.rm/mv/mkdirthroughcommandso config-level wrapper functions can't intercept them, and switches thegpg/tarpresence checks totype -qto match the repo's dependency-guard convention (also required fordocs/verify-manual.py's DEPENDENCIES check to resolve).--installnow writes a small standalone wrapper script (source this function file, callkey-crypt) to~/.local/bin/key-cryptinstead of copying the file itself, since a fish function can't be exec'd directly by the.desktopOpen With entries.--uninstallis unchanged aside from the command-prefixedrm.Test plan
fish -n functions/key-crypt.fish(syntax)python3 docs/verify-manual.py(84/84, including DEPENDENCIES resolution)--help, no-args (exit 2), missing-input (exit 1) in an isolated--no-configfish--force(exit 1, output exists), re-run with--force,--removerefusing when output would land inside input__kc_is_encryptedcorrectly distinguishes the produced.gpgfile from a plain file--install/--uninstallin an isolated$HOME: wrapper written, executable, and actually runs standalone (--help, missing-input) outside of fish's function context; desktop entries written and removedtmp,input,c_head, etc. all erased)8735e1b871tofc68486aaf