-
Notifications
You must be signed in to change notification settings - Fork 940
Multiple-IP's on a single interface, prompt silently fails #823
Comments
Did you specify your interface via |
Closing due to inactivity. Feel free to re-open if needed! |
Due to issues matching with some versions of iproute's 'ip' command, I've rewritten and thoroughly commented. See Powerlevel9k#823 If desired, a lot of this can be rewritten to be shorter (and theoretically a smidge faster to execute); I chose to write the initial code in this manner to make it easier to read what I've done when judging the pull request.
I'm terribly sorry for the delay. I dug back into this today, and was able to determine that there are instances where IP address 'acquisition' by powerlevel9k will silently fail due to an old version of the However, it does not work at all in my WSL 2.0 Debian environment. I've determined what I believe to be the root cause, using the following excerpt of the 'parseIp` function (I can confidently say that this silently failing is the cause) as a standalone script:
This is identical to the official function, except for where I removed the MacOSX lines (in order to make it easier to focus on the actual code in question, without compromising the accuracy of the testing). In the terminal, the raw output of the command saved into
This lacks the I've created a pull request that will address this, which you can find here. |
I know this SHOULD be a pull request, but I don't know nearly enough about the implications to be comfortable with that. In my use case, a CentOS 7 server with different IP addresses on eth0 and eth0:0, the existing method for saving the system IP to the $ip variable records two IP's, one per line. This multi-line $ip variable causes any prompt it's used in to silently fail to load.
Inserted as line 929, the following will set $ip to equal ONLY the first line.
ip=$(sed -n 1p <<< "$ip")
The text was updated successfully, but these errors were encountered: