add fish config

This commit is contained in:
FlintyLemming
2025-12-19 21:05:03 +08:00
parent d4beabc4a7
commit b9604ff8ba

View File

@@ -7,9 +7,9 @@ function fish_greeting
echo ""
# 1. 顶部欢迎与 UTC-8 时间
set_color -o cyan
echo "Welcome back, $USER"
echo "Welcome back, $USER"
# 在 TZ 环境变量中GMT+8 指向西八区 (UTC-8)
set -l current_time (env TZ="GMT+8" date "+%Y-%m-%d %H:%M:%S")
set -l current_time (env TZ="GMT-8" date "+%Y-%m-%d %H:%M:%S")
echo "Time (UTC-8): $current_time"
set_color normal
echo ""
@@ -36,8 +36,6 @@ function fish_greeting
set_color normal
end
echo " ----------------------------------------"
# 3. 包管理器逻辑 (优先检查 oma)
set -l pm_name ""
if type -q oma
@@ -57,7 +55,7 @@ function fish_greeting
end
end
echo " 󰏗 Package Manager: $pm_name"
echo "Package Manager: $pm_name"
echo ""
end