summaryrefslogtreecommitdiff
path: root/completions/ge.fish
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-19 16:31:25 +0300
committerPaul Buetow <paul@buetow.org>2026-04-19 16:31:25 +0300
commit5e259cafc87c96bbe6ab6c4a498099c1ffef0fac (patch)
tree87eac0697f0f93a4d2f2f9faf62b1f08ae10f62e /completions/ge.fish
parent7292a5db4e96ffeb30697ce3308d47777bf7c2f5 (diff)
feat: replace fish integration files with built-in fish subcommand (task u6)
Add `foostore fish` subcommand that prints the complete fish shell integration script (tab completions for foostore + the ge wrapper function) to stdout so users can source it with `foostore fish | source`. Remove install-fish.sh, FISH_INTEGRATION.md, and completions/ directory. Update CLAUDE.md and README.md to document the new workflow. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'completions/ge.fish')
-rw-r--r--completions/ge.fish53
1 files changed, 0 insertions, 53 deletions
diff --git a/completions/ge.fish b/completions/ge.fish
deleted file mode 100644
index ae723b1..0000000
--- a/completions/ge.fish
+++ /dev/null
@@ -1,53 +0,0 @@
-# Fish wrapper and completion for ge (foostore shortcut)
-# Install to ~/.config/fish/functions/ge.fish
-
-function ge --description 'foostore wrapper with shortcuts'
- # If no arguments, run interactive mode
- if test (count $argv) -eq 0
- foostore shell
- return $status
- end
-
- set -l cmd $argv[1]
-
- # Check if first argument is a known command
- if contains $cmd (foostore commands 2>/dev/null)
- # It's a command, pass through to foostore
- foostore $argv
- else
- # Not a command, treat as search term
- foostore search $argv
- end
-end
-
-# Dynamically load commands from foostore
-function __fish_ge_commands
- foostore commands 2>/dev/null
-end
-
-# Get list of entries for completion
-function __fish_ge_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 or search terms
-complete -c ge -f -n "__fish_use_subcommand" -a "(__fish_ge_commands)"
-complete -c ge -f -n "__fish_use_subcommand" -a "(__fish_ge_entries)"
-
-# Complete search terms for commands that need them
-complete -c ge -f -n "__fish_seen_subcommand_from search cat paste export pathexport open edit rm" -a "(__fish_ge_entries)"
-
-# Complete file paths for import
-complete -c ge -n "__fish_seen_subcommand_from import" -F
-
-# Complete directory paths for import destination
-complete -c ge -n "__fish_seen_subcommand_from import; and __fish_is_nth_token 3" -F -a "(__fish_complete_directories)"
-
-# Force flag for import
-complete -c ge -n "__fish_seen_subcommand_from import; and __fish_is_nth_token 4" -f -a "force"
-
-# Complete directory paths for import_r
-complete -c ge -n "__fish_seen_subcommand_from import_r" -F -a "(__fish_complete_directories)"