[Shellrun] Added nested tasks to shortcuts

This commit is contained in:
Ganesh Gore 2021-01-22 23:33:02 -07:00
parent 166e6014be
commit 47cee0988c
1 changed files with 6 additions and 1 deletions

View File

@ -79,7 +79,12 @@ unset-openfpga (){
if [[ $(ps -p $$ -oargs=) == *"zsh"* ]]; then
autoload -U +X bashcompinit; bashcompinit;
fi
TaskList=$(ls -tdalh ${OPENFPGA_TASK_PATH}/* | awk '{system("basename " $9)}' | awk '{printf("%s ",$1)}')
# TaskList=$(ls -tdalh ${OPENFPGA_TASK_PATH}/* | awk '{system("basename " $9)}' | awk '{printf("%s ",$1)}')
TaskList=$(ls -tdalh ${OPENFPGA_TASK_PATH}/**/task.conf |
awk '{print $9}' | sed -e "s/\/config\/task.conf//" |
sed -e "s/${OPENFPGA_PATH//\//\\/}\/openfpga_flow\/tasks\///" |
awk '{printf("%s ",$1)}')
complete -W "${TaskList}" goto-task
complete -W "${TaskList}" run-task
complete -W "${TaskList}" run-shell-task