Skip to content

Commit

Permalink
Add new commands to auto-complete list
Browse files Browse the repository at this point in the history
  • Loading branch information
tvami committed Apr 11, 2024
1 parent 36bb8f0 commit 7cea1d7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/ldmx-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,8 @@ __ldmx_help() {
COMMANDS:
help : print this help message and exit
ldmx help
compile : Compile ldmx-sw
ldmx compile
list : List the tag options for the input container repository
ldmx list (dev | pro | local)
clean : Reset ldmx computing environment
Expand Down Expand Up @@ -599,6 +601,7 @@ __ldmx_help() {
ldmx cmake ..
ldmx make install
ldmx fire config.py
ldmx recompFire config.py
ldmx python3 ana.py
HELP
Expand Down Expand Up @@ -795,12 +798,12 @@ __ldmx_complete() {

if [[ "$COMP_CWORD" = "1" ]]; then
# tab completing a main argument
__ldmx_complete_command "list clean config checkout pull use run mount setenv base source"
__ldmx_complete_command "list clean config checkout pull use run mount setenv base source compile recompFire"
elif [[ "$COMP_CWORD" = "2" ]]; then
# tab complete a sub-argument,
# depends on the main argument
case "${COMP_WORDS[1]}" in
config|setenv)
config|setenv|compile)
# no more arguments
__ldmx_dont_complete
;;
Expand Down Expand Up @@ -829,7 +832,7 @@ __ldmx_complete() {
# check base argument to see if we should continue
case "${COMP_WORDS[1]}" in
list|base|clean|config|pull|use|mount|setenv|source)
# these commands shouldn't have tab complete for the third argument
# these commands shouldn't have tab complete for the third argument
# (or shouldn't have the third argument at all)
__ldmx_dont_complete
;;
Expand Down

0 comments on commit 7cea1d7

Please sign in to comment.