completion command generates shell completion scripts that provide intelligent tab completion for Cloudstic commands, subcommands, flags, and values.
Usage
Supported Shells
- bash — Bourne Again Shell
- zsh — Z Shell
- fish — Friendly Interactive Shell
Installation
Generate the completion script
Run the completion command for your shell. The script is printed to stdout.
Load the completion script
Source the completion script in your current shell session or add it to your shell configuration file.Permanent installation:Alternative: Install to system completion directoryPermanent installation:Alternative: Install to completion directoryPermanent installation:
Bash
For current session only:Zsh
For current session only:Fish
For current session only:Reload your shell or start a new session
For bash and zsh:For fish:Or simply open a new terminal window.
Features
The completion scripts provide intelligent suggestions for:Commands and Subcommands
Flags and Options
Flag Values
File Path Completion
Context-Aware Completions
The completion scripts understand the current command context:Completion Examples
Completing Store Types
Completing Source Types
Completing Subcommands
Completing Shell Types
Troubleshooting
Bash: Completions not working
-
Ensure
bash-completionpackage is installed: -
Verify bash-completion is loaded in your
.bashrc:
Zsh: Command not found: compdef
- Enable
compinitin your.zshrcbefore sourcing the completion:
Fish: Completions not appearing
-
Check that the completion file was created:
-
Reload completions:
General: Old completions cached
If you update Cloudstic and completions don’t reflect new commands:Available Completions
The completion scripts provide suggestions for:Global Flags (available in all commands)
-store→local,b2,s3,sftp-store-path→ file path completion-store-prefix→ free text-s3-endpoint→ free text-s3-region→ free text-s3-access-key→ free text-s3-secret-key→ free text-sftp-host→ hostname completion-sftp-port→ free text (default:22)-sftp-user→ username completion-sftp-password→ free text-sftp-key→ file path completion-encryption-key→ free text-encryption-password→ free text-recovery-key→ free text-kms-key-arn→ free text-enable-packfile→ boolean flag-verbose→ boolean flag-quiet→ boolean flag-debug→ boolean flag
Command-Specific Flags
init
-recovery-no-encryption
backup
-source→local,sftp,gdrive,gdrive-changes,onedrive,onedrive-changes-source-path→ file path completion-drive-id→ free text-root-folder→ free text-tag→ free text (repeatable)-dry-run
restore
-output→ file path completion (default:./restore.zip)-path→ free text-dry-run
prune
-dry-run
forget
-prune-dry-run-keep-last→ number-keep-hourly→ number-keep-daily→ number-keep-weekly→ number-keep-monthly→ number-keep-yearly→ number-tag→ free text (repeatable)-source→ free text-account→ free text-path→ free text-group-by→ free text (default:source,account,path)
cat
-json
key passwd
-new-password→ free text
check
-read-data-snapshot→ free text
Notes
- Performance: Completions are generated dynamically based on the current command context
- File completions: File and directory paths use native shell completion capabilities
- No external dependencies: Completion scripts are self-contained and don’t require network access
- Automatic updates: Regenerate completions after upgrading Cloudstic to get the latest commands and flags
Related Commands
- — Display usage information
- — Print version information