1
Fork 0
mirror of https://github.com/Steffo99/config-fish.git synced 2024-12-22 14:54:23 +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,11 +1,11 @@
function discord_export
if test -z "$DISCORD_TOKEN_BOT"
echo_error "\$DISCORD_TOKEN_BOT is not set."
exit 1
return
end
set channels "--channel "$argv
set channels (string split -- " " "$channels")
discord-chat-exporter-cli export --bot $channels
end
end

View file

@ -36,24 +36,10 @@ function fish_prompt
# Hostname
set -g "CURRENT_IP" (who -m | awk '{print $5}')
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"
if test -z "$SSH_CLIENT"
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
set_color green
set_color cyan
end
echo -n (prompt_hostname)