-
-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add fish shell completion support (#263) #310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hydrauluu
wants to merge
3
commits into
Cyber-Syntax:main
Choose a base branch
from
hydrauluu:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+136
−45
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| # my-unicorn fish completion script | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use already existing autocomplete folder instead of completions |
||
| # ------------------------------------------------ | ||
| # Install: cp completions/my-unicorn.fish ~/.config/fish/completions/ | ||
| # ------------------------------------------------ | ||
|
|
||
| complete -c my-unicorn -f | ||
|
|
||
| # -- Global options ----------------------------------------------------------- | ||
|
|
||
| complete -c my-unicorn -l version -d 'Show my-unicorn version and exit' | ||
| complete -c my-unicorn -s h -l help -d 'Show help message and exit' | ||
|
|
||
| # -- Subcommands -------------------------------------------------------------- | ||
|
|
||
| complete -c my-unicorn -n __fish_use_subcommand -a install -d 'Install AppImages from catalog or URLs' | ||
| complete -c my-unicorn -n __fish_use_subcommand -a update -d 'Update installed AppImages' | ||
| complete -c my-unicorn -n __fish_use_subcommand -a upgrade -d 'Upgrade my-unicorn CLI' | ||
| complete -c my-unicorn -n __fish_use_subcommand -a catalog -d 'Browse AppImage catalog' | ||
| complete -c my-unicorn -n __fish_use_subcommand -a migrate -d 'Migrate configs to latest version' | ||
| complete -c my-unicorn -n __fish_use_subcommand -a remove -d 'Remove installed AppImages' | ||
| complete -c my-unicorn -n __fish_use_subcommand -a backup -d 'Manage AppImage backups and restore' | ||
| complete -c my-unicorn -n __fish_use_subcommand -a cache -d 'Manage release data cache' | ||
| complete -c my-unicorn -n __fish_use_subcommand -a token -d 'Manage GitHub authentication token' | ||
| complete -c my-unicorn -n __fish_use_subcommand -a auth -d 'Show GitHub authentication status' | ||
| complete -c my-unicorn -n __fish_use_subcommand -a config -d 'Manage configuration' | ||
|
|
||
| # -- install ------------------------------------------------------------------ | ||
|
|
||
| complete -c my-unicorn -n '__fish_seen_subcommand_from install' -l concurrency -d 'Maximum number of parallel installs' -r | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from install' -l no-icon -d 'Skip downloading application icons' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from install' -l no-verify -d 'Skip AppImage verification' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from install' -l no-desktop -d 'Skip desktop entry creation' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from install' -l verbose -d 'Show detailed logging during installation' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from install' -s h -l help -d 'Show help message and exit' | ||
|
|
||
| # -- update ------------------------------------------------------------------- | ||
|
|
||
| complete -c my-unicorn -n '__fish_seen_subcommand_from update' -l check-only -d 'Only check for updates without installing' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from update' -l refresh-cache -d 'Bypass cache and fetch fresh data from GitHub API' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from update' -l verbose -d 'Show detailed logging during update' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from update' -s h -l help -d 'Show help message and exit' | ||
|
|
||
| # -- upgrade ------------------------------------------------------------------ | ||
|
|
||
| complete -c my-unicorn -n '__fish_seen_subcommand_from upgrade' -l check -d 'Check for available updates without performing the upgrade' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from upgrade' -s h -l help -d 'Show help message and exit' | ||
|
|
||
| # -- catalog ------------------------------------------------------------------ | ||
|
|
||
| complete -c my-unicorn -n '__fish_seen_subcommand_from catalog' -l installed -d 'Show installed AppImages (default)' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from catalog' -l available -d 'Show available applications from catalog with descriptions' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from catalog' -l info -d 'Show detailed information about a specific app' -r | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from catalog' -s h -l help -d 'Show help message and exit' | ||
|
|
||
| # -- migrate ------------------------------------------------------------------ | ||
|
|
||
| complete -c my-unicorn -n '__fish_seen_subcommand_from migrate' -l dry-run -d 'Show what would be migrated without making changes' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from migrate' -l force -d 'Force migration even if versions match' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from migrate' -s h -l help -d 'Show help message and exit' | ||
|
|
||
| # -- remove ------------------------------------------------------------------- | ||
|
|
||
| complete -c my-unicorn -n '__fish_seen_subcommand_from remove' -l keep-config -d 'Keep configuration files' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from remove' -s h -l help -d 'Show help message and exit' | ||
|
|
||
| # -- backup ------------------------------------------------------------------- | ||
|
|
||
| complete -c my-unicorn -n '__fish_seen_subcommand_from backup' -l restore-last -d 'Restore the latest backup version' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from backup' -l restore-version -d 'Restore a specific version' -r | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from backup' -l list-backups -d 'List available backups for the specified app' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from backup' -l cleanup -d 'Clean up old backups according to max_backup setting' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from backup' -l info -d 'Show detailed backup information' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from backup' -s h -l help -d 'Show help message and exit' | ||
|
|
||
| # -- cache -------------------------------------------------------------------- | ||
|
|
||
| complete -c my-unicorn -n '__fish_seen_subcommand_from cache' -a clear -d 'Clear cache entries' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from cache' -a stats -d 'Show cache statistics and storage info' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from cache' -s h -l help -d 'Show help message and exit' | ||
|
|
||
| # -- cache clear subcommand --------------------------------------------------- | ||
|
|
||
| complete -c my-unicorn -n '__fish_seen_subcommand_from cache; and contains -- (commandline -opc); and not contains clear -- (commandline -opc); and not contains stats -- (commandline -opc)' -a clear -d 'Clear cache entries' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from cache; and string match -q clear -- (commandline -opc)[2]' -l all -d 'Clear all cache entries' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from cache; and string match -q clear -- (commandline -opc)[2]' -s h -l help -d 'Show help message and exit' | ||
|
|
||
| # -- token -------------------------------------------------------------------- | ||
|
|
||
| complete -c my-unicorn -n '__fish_seen_subcommand_from token' -l save -d 'Save GitHub authentication token' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from token' -l remove -d 'Remove GitHub authentication token' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from token' -s h -l help -d 'Show help message and exit' | ||
|
|
||
| # -- auth --------------------------------------------------------------------- | ||
|
|
||
| complete -c my-unicorn -n '__fish_seen_subcommand_from auth' -l status -d 'Show authentication status (default action)' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from auth' -s h -l help -d 'Show help message and exit' | ||
|
|
||
| # -- config ------------------------------------------------------------------- | ||
|
|
||
| complete -c my-unicorn -n '__fish_seen_subcommand_from config' -l show -d 'Show current configuration' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from config' -l reset -d 'Reset configuration to defaults' | ||
| complete -c my-unicorn -n '__fish_seen_subcommand_from config' -s h -l help -d 'Show help message and exit' | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please review autocompletion.bash, bash/zsh autocompletion files are never copied to root.