From 47cee0988c6eecdcbcd7a4e2eb9e1d80c4fea62f Mon Sep 17 00:00:00 2001 From: Ganesh Gore Date: Fri, 22 Jan 2021 23:33:02 -0700 Subject: [PATCH] [Shellrun] Added nested tasks to shortcuts --- openfpga.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openfpga.sh b/openfpga.sh index d897bc147..1f1138d13 100755 --- a/openfpga.sh +++ b/openfpga.sh @@ -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