Skip to content

Conversation

@anthony-chu
Copy link
Member

Copy link
Member

@drewbrokke drewbrokke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anthony-chu we will also need to fix the lecd function in the shell-source.sh file, since an extra argument is now required.

local closest_resource
local resource="${1}"

if [[ ${resource} == "" ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 things here:

  1. Variable expansion should generally be quoted to avoid word splitting:
if [[ "${resource}" == "" ]]; then
  1. Using -z is more concise than comparing to an empty string:
if [[ -z "${resource}" ]]; then

fi
fi

_print_step "Listing all ${resource//_/ }"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change, lecd will now show the output of _print_step as a selectable option. Let's just leave this off so that anything listed here can be used for scripting if desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants