Skip to content

Latest commit

 

History

History
117 lines (82 loc) · 2.45 KB

File metadata and controls

117 lines (82 loc) · 2.45 KB

Bash Completion

← Back to README · Quick Start · Installation · Usage

ShellDock supports shell autocompletion for bash, zsh, fish, and PowerShell.


Installation

Option 1: Temporary (Current Session Only)

source <(shelldock completion bash)

Option 2: Permanent (User-specific)

Add to your ~/.bashrc or ~/.bash_profile:

# If shelldock is in your PATH
echo 'source <(shelldock completion bash)' >> ~/.bashrc

# Or if you need to specify the full path
echo 'source <(/usr/local/bin/shelldock completion bash)' >> ~/.bashrc

Then reload your shell:

source ~/.bashrc

Option 3: System-wide Installation

# Generate completion script
shelldock completion bash > /etc/bash_completion.d/shelldock

# Or if using bash-completion package
shelldock completion bash > /usr/share/bash-completion/completions/shelldock

# Reload (if needed)
source /etc/bash_completion.d/shelldock

Usage

After installation, you can use tab completion:

# Complete commands
shelldock <TAB>
# Shows: run, show, list, ls, add, open, rm, manage, sync, update, upgrade, versions, config, echo, completion, help

# Complete command sets
shelldock run <TAB>
# Shows available command sets: docker, git, nodejs, python, kubernetes, etc.

# Complete flags
shelldock git --<TAB>
# Shows: --args, --local, --skip, --only, --ver, --yes, --help

# Short flags
shelldock git -<TAB>
# Shows: -a (run all without prompts), -l (local only)

# Complete subcommands
shelldock config <TAB>
# Shows: show, set

# Complete arguments (for --args flag)
shelldock git --args <TAB>
# May show argument names if supported

Features

  • Command completion
  • Command set name completion
  • Flag completion
  • Subcommand completion
  • Argument name hints (where applicable)

Troubleshooting

If completion doesn't work:

  1. Check if bash-completion is installed:

    which bash_completion
  2. Verify the completion script is loaded:

    type __start_shelldock
  3. Check for errors:

    source <(shelldock completion bash) 2>&1
  4. Reload your shell:

    exec bash

Other Shells

ShellDock also supports completion for other shells:

  • Zsh: shelldock completion zsh
  • Fish: shelldock completion fish
  • PowerShell: shelldock completion powershell

Install them similarly to bash completion.