Shell Completions
pikpaktui generates dynamic shell completions that complete cloud paths live from your PikPak drive — similar to how scp completes remote paths.
Zsh
# Add to ~/.zshrc
eval "$(pikpaktui completions zsh)"# Generate once and save to fpath
pikpaktui completions zsh > ~/.zfunc/_pikpaktui
# Add to ~/.zshrc (before compinit):
fpath=(~/.zfunc $fpath)
autoload -Uz compinit
compinitpikpaktui completions zsh > \
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/completions/_pikpaktui
# Restart your shell or run: omz reloadBash
mkdir -p ~/.local/share/bash-completion/completions
pikpaktui completions bash > ~/.local/share/bash-completion/completions/pikpaktui
# Or load for this shell only:
eval "$(pikpaktui completions bash)"
Fish
mkdir -p ~/.config/fish/completions
pikpaktui completions fish > ~/.config/fish/completions/pikpaktui.fish
# Or load for this shell only:
eval (pikpaktui completions fish | string collect)
PowerShell
pikpaktui completions powershell | Out-String | Invoke-Expression
What Gets Completed
| Context | Completions |
|---|---|
pikpaktui <Tab> | All subcommands with descriptions |
pikpaktui ls /<Tab> | Live remote directory listing |
pikpaktui ls -<Tab> | -l, --long, -J, --json, -s, --sort, -r, --reverse, --tree, --depth |
pikpaktui ls --sort <Tab> | name, size, created, type, extension, none |
pikpaktui mv /src<Tab> | Cloud path completion |
pikpaktui mv -t /dst<Tab> | Cloud path for -t target |
pikpaktui cp /src<Tab> | Cloud path completion |
pikpaktui download /cloud<Tab> | Cloud path completion |
pikpaktui download -o <Tab> | Local file path |
pikpaktui upload <Tab> | Local file path |
pikpaktui upload -t /dst<Tab> | Cloud path for -t target |
pikpaktui share /path<Tab> | Cloud path completion |
pikpaktui offline --to /dst<Tab> | Cloud path for --to |
pikpaktui offline --name <Tab> | (free text) |
pikpaktui tasks <Tab> | list, ls, show, retry, delete, rm |
pikpaktui rm -<Tab> | recursive, force, and dry-run flags |
pikpaktui mkdir -<Tab> | -p, -n, --dry-run |
pikpaktui info /path<Tab> | Cloud path |
pikpaktui cat /path<Tab> | Cloud path |
pikpaktui play /path<Tab> | Cloud path |
pikpaktui rename /path<Tab> | Cloud path |
pikpaktui star /path<Tab> | Cloud path |
pikpaktui unstar /path<Tab> | Cloud path |
pikpaktui completions <Tab> | bash, zsh, fish, powershell |
How Cloud Path Completion Works
When you type a cloud path prefix and press Tab, pikpaktui:
- Calls
pikpaktui __complete_path <dir>internally - Lists entries in that remote directory
- Returns folder names with a trailing
/(so pressing Tab again descends into them)
Requirements:
- An active session (
~/.config/pikpaktui/session.json) - Network access to PikPak API
There may be a brief delay on first completion while the API is queried. Subsequent completions in the same directory are fast.
Currently Supported Shells
Bash, Zsh, Fish, and PowerShell are supported.