You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Liquidprompt was relying on the default IFS for most needs. This was
somewhat safe, as it saved the IFS value from startup, and used that
when it needed an IFS value. The problem cropped up when the user set a
blank, weird, or completely unset value for IFS before sourcing
Liquidprompt. In this case some `read` calls would fail.
The simple fix is anywhere IFS is used, to make a local IFS with the
exact value that is needed. There are only two cases that use IFS:
* `read`, which uses IFS to split the string into fields to put into the
specified variables.
* Unquoted $var or $(command) references, often passed into `for` or
similar. Note that this doesn't apply to unquoted variable assignments
(`foo=$bar`, doesn't need to be quoted, will never split).
Fixesliquidprompt#613
Shell: bash 4.4.19(1)-release
Operating system: Linux 4.18.0-193.6.3.el8_2.x86_64, CentOS Linux release 8.2.2004 (Core)
Liquidprompt version: v1.12-beta.1
Steps to Reproduce
IFS=""
and/orunset IFS
.. liquidprompt
).Expected Behavior
No errors are printed on each prompt.
Current Behavior
Every prompt return prints something like this:
Turning on debug traces like this:
Possible Solution
Probably we need to create a local IFS each time we are going to
for
loop through some program output. Probablylocal IFS='\n'
here would be a start:https://github.com/nojhan/liquidprompt/blob/5f9bb675c10023ddf578ec1f4c0a79d6a1193ba4/liquidprompt#L1512-L1513
The text was updated successfully, but these errors were encountered: