fish-nuggets icon indicating copy to clipboard operation
fish-nuggets copied to clipboard

rvm function stripping parentheses from "Program Files (x86)"

Open TeWu opened this issue 5 years ago • 0 comments

I'm using fish in Cygwin, so that PATH variable contains paths with "Program Files (x86)" directory. The issue is that sed invocation in 8th line of rvm function is stripping parenthesis from paths, which makes them invalid.

My quick and dirty workaround was to change this line to:

and eval (grep -E '^rvm|^PATH|^GEM_PATH|^GEM_HOME' $env_file | grep -v '_clr=' | sed '/^[^=]*PATH/s/:/" "/g; s/^/set -xg /; s/=/ "/; s/$/" ;/; s/(//; s/)//' | string replace "Program Files x86" "Program Files (x86)")

I'm not sure why you are stripping parentheses (fa28b004d31d5e77d154435cc4c800143b7ed745), but if that isn't necessary then solution would be to just don't ;) (that is, remove s/(//; s/)// part of sed script)

TeWu avatar Aug 08 '18 14:08 TeWu