-
Mislav Marohnić authored
Depending on bash version, the expression `${var/$HOME\//~/}` will not have effect because the "~" character in the replacement expression is expanded. The updated approach is a bit of a mouthful, but it avoids using "~" in a substitution pattern, while also guarding against values of HOME that are blank or when HOME is literally just "/".
Mislav Marohnić authoredDepending on bash version, the expression `${var/$HOME\//~/}` will not have effect because the "~" character in the replacement expression is expanded. The updated approach is a bit of a mouthful, but it avoids using "~" in a substitution pattern, while also guarding against values of HOME that are blank or when HOME is literally just "/".
Loading