Skip to content

Commit

Permalink
make sure tab completion is loaded and add link to readme for anyone …
Browse files Browse the repository at this point in the history
…seeing deprecation warning
  • Loading branch information
tomeichlersmith committed Aug 31, 2024
1 parent 0d3e3f2 commit 605aa50
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/ldmx-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,25 @@ if __have just && __have denv; then
# make alias and leave
alias ldmx="just -f ${_default_justfile}"
# see https://just.systems/man/en/chapter_55.html

# if invoking 'just' directly, you can put the path to ldmx-sw as a prefix
# to the command you want to run. The following are all the same.
# just path/to/ldmx-sw/build
# just -f path/to/ldmx-sw/justfile build
# cd path/to/ldmx-sw && just build

# we need to make sure that tab completion for just is loaded
if ! type -t _just &> /dev/null; then
eval "$(just --completions bash)"
fi

# add just tab complete to ldmx alias
complete -F _just -o bashdefault -o default ldmx
return 0
else
echo "[ldmx-env.sh] [WARNING] The bash functions that you will be using are deprecated."
echo " Please install the commands 'denv' and 'just' to update to the new development workflow."
echo " https://github.com/LDMX-Software/ldmx-sw/blob/trunk/README.md"
fi


Expand Down

0 comments on commit 605aa50

Please sign in to comment.