1
Fork 0
mirror of https://github.com/Steffo99/config-fish.git synced 2024-12-22 23:04:22 +00:00
This commit is contained in:
Steffo 2022-04-27 03:06:31 +02:00
parent 7500bdd88a
commit f64e38e33e
Signed by: steffo
GPG key ID: 6965406171929D01
2 changed files with 4 additions and 18 deletions

View file

@ -1,7 +1,7 @@
function discord_export function discord_export
if test -z "$DISCORD_TOKEN_BOT" if test -z "$DISCORD_TOKEN_BOT"
echo_error "\$DISCORD_TOKEN_BOT is not set." echo_error "\$DISCORD_TOKEN_BOT is not set."
exit 1 return
end end
set channels "--channel "$argv set channels "--channel "$argv

View file

@ -36,24 +36,10 @@ function fish_prompt
# Hostname # Hostname
set -g "CURRENT_IP" (who -m | awk '{print $5}') if test -z "$SSH_CLIENT"
if test -z "$CURRENT_IP"
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
if test -z "$CURRENT_IP"
set_color green set_color green
else if test "$CURRENT_IP" "=" "(:0)"
set_color brgreen
else if string match --regex --quiet '\(.+\)' "$CURRENT_IP" > /dev/null
set_color cyan
else else
set_color green set_color cyan
end end
echo -n (prompt_hostname) echo -n (prompt_hostname)