diff --git a/functions/discord_export.fish b/functions/discord_export.fish index 25bb7f2..ad9ae1c 100644 --- a/functions/discord_export.fish +++ b/functions/discord_export.fish @@ -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 \ No newline at end of file +end diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index 52ef9cd..cfcf394 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -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)