reitzig / sdkman-for-fish

Adds support for SDKMAN! to fish
MIT License
280 stars 13 forks source link

Completion for installed candidates broken if home folder does not have standard path #14

Closed reitzig closed 5 years ago

reitzig commented 5 years ago

Completion of installed candidates provides candidates instead of e.g. java.

Cause:

function __fish_sdkman_candidates_with_versions
  find ~/.sdkman/candidates/ -name '*current*' -printf "%h\n" \
  | cut -d '/' -f 6 \
  | sort -u
end

cut -f 6 assumes that the path of the home folder is standard (/home/username) but it might not be.