mirror of
https://github.com/bmartini/zynq-axis.git
synced 2024-09-05 19:19:27 +08:00
Update bash script completion definitions
This allows for the the 'pkg-module' script to have bash tab completion when invoked in the repos root directory. Its the same as the 'sim-module' auto completion in that it looks in the 'hdl' directory for module file names.
This commit is contained in:
parent
91a3256ae6
commit
8c22d67eec
@ -13,6 +13,17 @@ fi
|
||||
BASHRC_CODE
|
||||
|
||||
|
||||
_pkg-module_complete() {
|
||||
COMPREPLY=()
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
local completions="$(find hdl/ -type f \( -name "*.v" ! -name "*_tb.v" \) \
|
||||
-exec basename {} .v \; | xargs echo)"
|
||||
|
||||
COMPREPLY=( $(compgen -W "$completions" -- "$cur") )
|
||||
}
|
||||
complete -F _pkg-module_complete pkg-module
|
||||
|
||||
|
||||
_sim-module_complete() {
|
||||
COMPREPLY=()
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user