mirror of
https://github.com/Steffo99/config-fish.git
synced 2024-12-22 23:04:22 +00:00
Another fix for the bug in the prompt
This commit is contained in:
parent
85dc30dfbb
commit
cb130473a8
1 changed files with 5 additions and 2 deletions
|
@ -39,8 +39,11 @@ function fish_prompt
|
||||||
set -g CURRENT_IP (who am i | awk '{print $5}')
|
set -g CURRENT_IP (who am i | awk '{print $5}')
|
||||||
|
|
||||||
if test -z "$CURRENT_IP"
|
if test -z "$CURRENT_IP"
|
||||||
# Experiment
|
set -g "CURRENT_IP" (who | grep "$USER" | awk '{print $5}')
|
||||||
set -g CURRENT_IP (who | grep "$USER" | awk '{print $5}')
|
end
|
||||||
|
|
||||||
|
if test -z "$CURRENT_IP"
|
||||||
|
set -g "CURRENT_IP" (who | grep "$SUDO_USER" | awk '{print $5}')
|
||||||
end
|
end
|
||||||
|
|
||||||
if test -z "$CURRENT_IP"
|
if test -z "$CURRENT_IP"
|
||||||
|
|
Loading…
Reference in a new issue