Skip to content

Latest commit

 

History

History

completions

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Shell Completions

Shell completions for framework_tool are auto-generated using clap_complete. The man page (framework_tool/framework_tool.1) is likewise auto-generated using clap_mangen.

Regenerating

If you modify the CLI arguments, regenerate completions and the man page:

cargo build
./target/debug/framework_tool --generate-completions bash > framework_tool/completions/bash/framework_tool
./target/debug/framework_tool --generate-completions zsh > framework_tool/completions/zsh/_framework_tool
./target/debug/framework_tool --generate-completions fish > framework_tool/completions/fish/framework_tool.fish
./target/debug/framework_tool --generate-manpage > framework_tool/framework_tool.1

Preview the man page with man -l framework_tool/framework_tool.1.

Testing

framework_tool must be in your PATH for completions to work.

Bash:

export PATH="$PWD/target/debug:$PATH"
source framework_tool/completions/bash/framework_tool
framework_tool --<TAB>

Zsh:

export PATH="$PWD/target/debug:$PATH"
source framework_tool/completions/zsh/_framework_tool
framework_tool --<TAB>

Fish:

fish_add_path $PWD/target/debug
source framework_tool/completions/fish/framework_tool.fish
framework_tool --<TAB>

PowerShell:

framework_tool --generate-completions powershell | Invoke-Expression
framework_tool --<TAB>

Persistent Installation

Linux: Should be done by downstream package maintainers.

Windows/PowerShell:

framework_tool --generate-completions powershell >> $PROFILE