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
|
||||
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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue