mirror of
https://github.com/Steffo99/config-fish.git
synced 2024-12-22 14:54:23 +00:00
Update
This commit is contained in:
parent
7500bdd88a
commit
f64e38e33e
2 changed files with 4 additions and 18 deletions
|
@ -1,11 +1,11 @@
|
||||||
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
|
||||||
set channels (string split -- " " "$channels")
|
set channels (string split -- " " "$channels")
|
||||||
|
|
||||||
discord-chat-exporter-cli export --bot $channels
|
discord-chat-exporter-cli export --bot $channels
|
||||||
end
|
end
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue