pikpaktui v0.0.58
docs / guide / Shell Completions

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)"

Bash

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

ContextCompletions
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:

  1. Calls pikpaktui __complete_path <dir> internally
  2. Lists entries in that remote directory
  3. 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.