mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-20 06:03:07 +00:00
Wallet CLI Completion
Completion scripts for the LSSA wallet command.
ZSH
Works with both vanilla zsh and oh-my-zsh.
Features
- Full completion for all wallet subcommands
- Contextual option completion for each command
- Dynamic account ID completion via
wallet account list - Descriptions for all commands and options
Supported Commands
| Command | Description |
|---|---|
wallet auth-transfer |
Authenticated transfer (init, send) |
wallet chain-info |
Chain info queries (current-block-id, block, transaction) |
wallet account |
Account management (get, list, new, sync-private) |
wallet pinata |
Piñata faucet (claim) |
wallet token |
Token operations (new, send) |
wallet amm |
AMM operations (new, swap, add-liquidity, remove-liquidity) |
wallet check-health |
Health check |
Installation
Vanilla Zsh
-
Create a completions directory:
mkdir -p ~/.zsh/completions -
Copy the completion file:
cp ./zsh/_wallet ~/.zsh/completions/ -
Add to your
~/.zshrc(before anycompinitcall, or add these lines if you don't have one):fpath=(~/.zsh/completions $fpath) autoload -Uz compinit && compinit -
Reload your shell:
exec zsh
Oh-My-Zsh
-
Create the plugin directory and copy the file:
mkdir -p ~/.oh-my-zsh/custom/plugins/wallet cp _wallet ~/.oh-my-zsh/custom/plugins/wallet/ -
Add
walletto your plugins array in~/.zshrc:plugins=(... wallet) -
Reload your shell:
exec zsh
Requirements
The completion script calls wallet account list to dynamically fetch account IDs. Ensure the wallet command is in your $PATH.
Usage
# Main commands
wallet <TAB>
# Account subcommands
wallet account <TAB>
# Options for auth-transfer send
wallet auth-transfer send --<TAB>
# Account types when creating
wallet account new <TAB>
# Shows: public private
# Account IDs (fetched dynamically)
wallet account get --account-id <TAB>
# Shows: Public/... Private/...
Troubleshooting
Completions not appearing
-
Check that
compinitis called in your.zshrc -
Rebuild the completion cache:
rm -f ~/.zcompdump* exec zsh
Account IDs not completing
Ensure wallet account list works from your command line.