handle slashes at end of _bin_dir

*usually*, $PATH will *not* contain trailing slashes, while _bin_dir may or may not. This changes the case statement to test for `_bin_dir`, `_bin_dir/`, and `_bin_dir` without a trailing slash.
This reduces false positives and unnecessary logs
This commit is contained in:
aarondill 2023-07-05 14:02:26 -05:00
parent dff0050a5e
commit 98bf021db9
1 changed files with 3 additions and 1 deletions

View File

@ -175,7 +175,9 @@ main() {
log ""
log "zoxide is installed!"
case ":${PATH}:" in
*":${_bin_dir}:"*) true ;; # noop
*":${_bin_dir}:"*) true ;; # noop
*":${_bin_dir%/}:"*) true ;; # noop
*":${_bin_dir}/:"*) true ;; # noop
*) log "NOTE: ${_bin_dir} is not on your \$PATH. zoxide will not work unless it is added to \$PATH." ;;
esac
}