shorten_path: Escape '%' instead of using a var
When ${var//orig/replace} is intended with orig as '%' there is no need to use a variable to avoid the '//%' form if the '%' is escaped.
This commit is contained in:
parent
b50f9e2e9e
commit
64f93eb564
@ -586,9 +586,7 @@ _lp_shorten_path()
|
|||||||
if $_LP_SHELL_bash; then
|
if $_LP_SHELL_bash; then
|
||||||
LP_PWD="${ret//\\/\\\\}"
|
LP_PWD="${ret//\\/\\\\}"
|
||||||
else # zsh
|
else # zsh
|
||||||
#LP_PWD="${ret//%/%%}" # This doesn't work :( zsh bug?
|
LP_PWD="${ret//\%/%%}"
|
||||||
p='%'
|
|
||||||
LP_PWD="${ret//$p/%%}"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user