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:
parent
dff0050a5e
commit
98bf021db9
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue