diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-22 20:50:32 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-22 20:50:32 +0200 |
| commit | 7de95e396d729895a7e1e27c1155c9d365fab41c (patch) | |
| tree | 67e0212e4aa6e641b84185b7f4ddb57d602e0864 /completions/foostore.fish | |
| parent | 3373b7e90c4e1ff1abcebe0594316131f546dfa8 (diff) | |
Fix fish shell integration after binary rename to foostore (v0.4.0)v0.4.0
- Rename completions/geheim.fish → completions/foostore.fish
- Update all geheim references to foostore in ge.fish, install-fish.sh, FISH_INTEGRATION.md
- Add fish shell integration section to README
- Fix stale comment in internal/version/version.go
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'completions/foostore.fish')
| -rw-r--r-- | completions/foostore.fish | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/completions/foostore.fish b/completions/foostore.fish new file mode 100644 index 0000000..88056f1 --- /dev/null +++ b/completions/foostore.fish @@ -0,0 +1,33 @@ +# Fish completion for foostore +# Install to ~/.config/fish/completions/foostore.fish + +# Dynamically load commands from foostore +function __fish_foostore_commands + foostore commands 2>/dev/null +end + +# Get list of entries for completion +function __fish_foostore_entries + # Only run if PIN is set to avoid interactive prompt + if set -q PIN + foostore ls 2>/dev/null | string replace -r ';.*$' '' | string trim + end +end + +# Complete subcommands +complete -c foostore -f -n "__fish_use_subcommand" -a "(__fish_foostore_commands)" + +# Complete search terms for commands that need them +complete -c foostore -f -n "__fish_seen_subcommand_from search cat paste export pathexport open edit rm" -a "(__fish_foostore_entries)" + +# Complete file paths for import +complete -c foostore -n "__fish_seen_subcommand_from import" -F + +# Complete directory paths for import destination +complete -c foostore -n "__fish_seen_subcommand_from import; and __fish_is_nth_token 3" -F -a "(__fish_complete_directories)" + +# Force flag for import +complete -c foostore -n "__fish_seen_subcommand_from import; and __fish_is_nth_token 4" -f -a "force" + +# Complete directory paths for import_r +complete -c foostore -n "__fish_seen_subcommand_from import_r" -F -a "(__fish_complete_directories)" |
