evanthegrayt / cdc

☣️ Shell plugin for zsh/bash that allows you to cd to subdirectories of user-defined directories from anywhere, without editing CDPATH.
MIT License
22 stars 0 forks source link

Update the way booleans are handled. #65

Closed evanthegrayt closed 1 month ago

evanthegrayt commented 1 month ago

Recently read that using the shell commands true and false should be avoided in shell scripts. Change all instances of

some_var=true
if $some_var; then
   # ...
fi

to

some_var=true
if [[ $some_var == true ]]; then
  # ...
fi