Skip to content

Commit

Permalink
Account for an empty action.
Browse files Browse the repository at this point in the history
  • Loading branch information
FlipperPA committed Mar 31, 2023
1 parent 3235f9e commit 5473df2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,13 @@ function pyro_setup_list() {
param_venv_name=$1

local IFS=:
# Set ACTION to --list if null
ACTION=${ACTION:="--list"}
# Ensure that our metadata file exists
touch ~/.pyromania
while read line; do
set $line
if [ $ACTION = "--autocomplete-list" ]; then
if [ $ACTION == "--autocomplete-list" ]; then
if [ "$VENV_LIST" = "" ]; then
VENV_LIST=$1
else
Expand Down Expand Up @@ -263,7 +265,7 @@ pyro_autocomplete()
opts="--create -c --delete -d --packages -p"
fi

if [[ ${cur} == * ]] ; then
if [[ ${cur} == * ]]; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
fi
Expand Down

0 comments on commit 5473df2

Please sign in to comment.