mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-20 20:34:19 +00:00
The five completion scripts are hand-written and had drifted from the CLI's argument parsing. Some entries sent users down paths that no longer exist: `backup restore` backed up a target named "restore", `extras mode` only printed help, `install --source` failed as an unknown option, and `hub index --audit-skills` was rejected because the flag is `--audit`. pull, push and commit were offered -p/-g, which they ignore. Those stale entries are gone, and the scripts now complete: - backup files list/show/restore, audit rules disable/enable/severity/ reset/init, ui start/stop, mcp edit (bash, PowerShell, Nushell) - sync scopes and the `agents` kind keyword where commands accept it - flags the CLI parses but no shell offered, among them sync --quiet, status --json, new/search flags, enable/disable --kind, backup --delete/--all, restore/trash --all, ui --base-path/--clear-cache/--app, hub add --label, hub default --reset, mcp --disabled/--keep-files, analyze --verbose/--filter, init --git-root/--visible/--config and the extras subcommand and `extras <name>` flags - fish: the target filter flags, --agent and --config-dir, and restore PowerShell also stops swallowing a flag typed as the second word for commands that have a subcommand list, so adding list, sync and the other kind-aware commands to that table keeps their flag completion. The completion reference page in every locale listed the stale subcommands; it now lists the current ones.
3.2 KiB
3.2 KiB
sidebar_position
| sidebar_position |
|---|
| 5 |
completion
Generate and install shell completion scripts for tab-completion of commands, subcommands, and flags.
When to Use
- You want tab-completion for skillshare commands and flags
- You set up a new machine or shell environment
- You use an alias (e.g.
ss) and want completions to work with it
Synopsis
# Auto-install (recommended)
skillshare completion bash --install
skillshare completion zsh --install
skillshare completion fish --install
skillshare completion powershell --install
skillshare completion nushell --install
# Output script to stdout (advanced)
skillshare completion bash
skillshare completion zsh > ~/.zsh/completions/_skillshare
Supported Shells
| Shell | Install Path |
|---|---|
| bash | ~/.local/share/bash-completion/completions/skillshare |
| zsh | ~/.zsh/completions/_skillshare |
| fish | ~/.config/fish/completions/skillshare.fish |
| powershell | ~/.config/powershell/completions/skillshare.ps1 |
| nushell | ~/.config/nushell/completions/skillshare.nu |
Flags
| Flag | Description |
|---|---|
--install |
Write completion script to the standard install path |
--help, -h |
Show usage |
Completion Scope
The generated scripts provide tab-completion for:
- Commands — all top-level commands (
sync,install,list, etc.) - Subcommands —
target add/remove/list,trash list/restore/delete/empty,hub add/list/remove/default/index,extras init/list/remove/collect/source,audit rules disable/enable/severity/reset/init,backup files list/show/restore,ui start/stop - Flags — per-command flags with short forms (
--dry-run/-n,--force/-f, etc.) - Global flags —
--project/-p,--global/-g
Alias Support
The bash, zsh, and PowerShell scripts automatically detect aliases pointing to skillshare and register completions for them:
alias ss=skillshare
source <(skillshare completion bash)
ss sy<Tab> # → ss sync
Fish aliases (which are function wrappers) inherit completions automatically.
For Nushell, alias completions are inherited natively when using alias ss = skillshare in your config.
Post-Install Steps
After --install, you may need to activate the completions:
Bash
# Restart your shell, or:
source ~/.local/share/bash-completion/completions/skillshare
Zsh
Add to your .zshrc (if not already present):
fpath=(~/.zsh/completions $fpath)
autoload -Uz compinit && compinit
Then restart your shell or run exec zsh.
Fish
Completions are available automatically in new fish sessions.
PowerShell
Add to your PowerShell profile (echo $PROFILE):
. ~/.config/powershell/completions/skillshare.ps1
Nushell
Add to your Nushell config ($nu.config-path):
source ~/.config/nushell/completions/skillshare.nu
Example
$ skillshare completion bash --install
✔ Completion script installed to /home/user/.local/share/bash-completion/completions/skillshare
ℹ Restart your shell or run:
source /home/user/.local/share/bash-completion/completions/skillshare