Compare commits

..

84 Commits

Author SHA1 Message Date
FlintyLemming c988f6b994 Merge branch 'main' of https://git.mitsea.com/FlintyLemming/dotfiles 2026-01-06 19:19:49 +08:00
FlintyLemming 0aa39e012f add ssh server 2026-01-06 19:19:29 +08:00
FlintyLemming 2ea8c0ab08 更新 ssh/config 2026-01-06 00:03:38 +08:00
FlintyLemming f46f87aabe add ssh server 2026-01-05 21:49:32 +08:00
FlintyLemming 3acb2c6817 add fish config 2026-01-05 10:59:46 +08:00
FlintyLemming c5499fe473 add fish config 2026-01-05 10:13:02 +08:00
FlintyLemming 2b07d00cd0 add ssh server 2026-01-03 19:15:38 +08:00
FlintyLemming 4d0cc51535 更新 ssh/config 2026-01-02 22:51:22 +08:00
FlintyLemming 4142c06920 更新 ssh/idc-aliyun-sg2.pub 2026-01-02 22:50:40 +08:00
FlintyLemming 323b8d708e 添加 ssh/idc-aliyun-sg2 2026-01-02 22:50:27 +08:00
FlintyLemming 42235cddae add fish config 2025-12-31 16:22:59 +08:00
FlintyLemming f96c1f168c add fish config 2025-12-31 16:17:46 +08:00
FlintyLemming 8d586ed415 add fish config 2025-12-31 16:14:34 +08:00
FlintyLemming 3dabbaa13a add ssh server 2025-12-30 21:13:09 +08:00
FlintyLemming 8e6c58c3c6 add ssh server 2025-12-30 21:12:09 +08:00
FlintyLemming c23bdf41eb add fish config 2025-12-29 21:24:15 +08:00
FlintyLemming ed3f7060c2 add fish config 2025-12-25 14:44:56 +08:00
FlintyLemming 985cd07f51 add fish config 2025-12-25 11:55:17 +08:00
FlintyLemming 2495d61c93 add fish config 2025-12-23 10:58:47 +08:00
FlintyLemming 8f1907e200 add ssh server 2025-12-22 21:58:15 +08:00
FlintyLemming 89742a383b add ssh server 2025-12-22 21:17:17 +08:00
FlintyLemming 97a2ded127 add ssh server 2025-12-22 21:00:00 +08:00
FlintyLemming 8a44f2ffff add ssh server 2025-12-22 20:58:34 +08:00
FlintyLemming d3418234e7 add ssh server 2025-12-22 20:57:40 +08:00
FlintyLemming a8349be54e add fish config 2025-12-22 16:45:31 +08:00
FlintyLemming fa6e44189c add fish config 2025-12-22 16:43:46 +08:00
FlintyLemming 4c1f6a7bcf add fish config 2025-12-22 11:06:17 +08:00
FlintyLemming e0c8cd7592 add fish config 2025-12-22 10:53:50 +08:00
FlintyLemming 355f98d55e add fish config 2025-12-19 21:11:03 +08:00
FlintyLemming ca6dd33612 add fish config 2025-12-19 21:05:42 +08:00
FlintyLemming b9604ff8ba add fish config 2025-12-19 21:05:03 +08:00
FlintyLemming d4beabc4a7 add fish config 2025-12-19 21:02:38 +08:00
FlintyLemming 44da080b9c add fish config 2025-12-19 21:00:51 +08:00
FlintyLemming 8d4b08ca7c add fish config 2025-12-19 20:58:19 +08:00
FlintyLemming 39fa9432eb add ssh server 2025-12-19 20:08:12 +08:00
FlintyLemming 96c1693fd5 add fish config 2025-12-19 16:47:25 +08:00
FlintyLemming 2c149026be add fish config 2025-12-19 16:44:59 +08:00
FlintyLemming 979da9fe21 add fish config 2025-12-19 16:41:05 +08:00
FlintyLemming 4a554cf0c6 add fish config 2025-12-19 16:30:32 +08:00
FlintyLemming 811107029b add fish config 2025-12-19 16:26:38 +08:00
FlintyLemming d3df3d6f38 add fish config 2025-12-19 16:03:11 +08:00
FlintyLemming 4e83c9bef3 add fish config 2025-12-19 16:01:58 +08:00
FlintyLemming f48835b0a9 add fish config 2025-12-19 16:00:19 +08:00
FlintyLemming 76262a9179 add fish config 2025-12-19 15:56:18 +08:00
FlintyLemming b086a2abc8 add fish config 2025-12-19 15:52:48 +08:00
FlintyLemming 5ea79aac01 add fish config 2025-12-19 15:51:34 +08:00
FlintyLemming 1d742a8974 add fish config 2025-12-19 15:42:05 +08:00
FlintyLemming 1586cc564e add fish config 2025-12-19 15:38:45 +08:00
FlintyLemming 8b3e4e397b add ssh server 2025-12-19 15:17:23 +08:00
FlintyLemming cd95a21c87 add fish config 2025-12-19 14:13:57 +08:00
FlintyLemming f31a69dd08 add fish config 2025-12-19 14:08:38 +08:00
FlintyLemming 83053a3e42 add fish config 2025-12-19 14:05:47 +08:00
FlintyLemming a7e11e85e5 add fish config 2025-12-19 14:02:17 +08:00
FlintyLemming 3a9506b6d9 add ssh server 2025-12-19 13:54:43 +08:00
FlintyLemming b228c98d6d add ssh server 2025-12-19 12:10:55 +08:00
FlintyLemming a538b16ca4 add fish config 2025-12-18 18:13:15 +08:00
FlintyLemming 81c2d5a065 add ssh server 2025-12-18 17:44:57 +08:00
FlintyLemming 9342595029 add ssh server 2025-12-18 13:34:14 +08:00
FlintyLemming a62a61fab4 add ssh server 2025-12-18 12:56:06 +08:00
FlintyLemming 33b934fd9f add ssh server 2025-12-18 12:55:27 +08:00
FlintyLemming 4e6506b04f add ssh server 2025-12-18 12:52:23 +08:00
FlintyLemming bdae031a83 add ssh server 2025-12-18 11:56:06 +08:00
FlintyLemming 07c073aa55 add ssh server 2025-12-18 11:53:34 +08:00
FlintyLemming 9cc0206270 add ssh server 2025-12-18 11:50:59 +08:00
FlintyLemming c6c8b70129 add ssh server 2025-12-18 11:41:29 +08:00
FlintyLemming 635bb5c1dd add ssh server 2025-12-18 11:31:19 +08:00
FlintyLemming 695549c7cf add ssh server 2025-12-18 11:14:57 +08:00
FlintyLemming 78c7081012 add ssh server 2025-12-18 11:14:29 +08:00
FlintyLemming 4c1ac4186b add ssh server 2025-12-18 11:01:07 +08:00
FlintyLemming 88b79995e0 add ssh server 2025-12-18 10:51:41 +08:00
FlintyLemming c066142088 add ssh server 2025-12-18 10:44:39 +08:00
FlintyLemming 568422196a add ssh server 2025-12-18 10:39:14 +08:00
FlintyLemming 54ee390764 add ssh server 2025-12-18 10:31:25 +08:00
FlintyLemming 0f6ba374ad add ssh server 2025-12-18 10:22:37 +08:00
FlintyLemming 2b127a1f99 add ssh server 2025-12-18 10:21:01 +08:00
FlintyLemming 57b80fcb85 add ssh server 2025-12-18 10:15:40 +08:00
FlintyLemming 4299794055 add ssh server 2025-12-18 10:12:51 +08:00
FlintyLemming 50baf6b73c add ssh server 2025-12-18 10:08:59 +08:00
FlintyLemming 39d6968fdc add ssh server 2025-12-18 10:00:30 +08:00
FlintyLemming 510af666fc add ssh server 2025-12-18 09:58:41 +08:00
FlintyLemming 3d5df244c9 add ssh server 2025-12-17 21:53:36 +08:00
FlintyLemming 49d5a4ffe5 add ssh server 2025-12-17 21:48:01 +08:00
FlintyLemming 4a14abc505 add bin files 2025-12-17 20:58:48 +08:00
FlintyLemming 5b4069e8b0 add bin files 2025-12-17 20:51:00 +08:00
36 changed files with 340 additions and 239 deletions
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Executable
+47
View File
@@ -0,0 +1,47 @@
#!/usr/bin/env fish
set -l arg_count (count $argv)
# 1. 检查是否有输入参数
if test $arg_count -eq 0
echo "用法: zp <文件或目录1> [文件或目录2] ..."
exit 1
end
# 2. 预检:检查是否安装了 pigz
set -l compress_tool ""
if command -v pigz >/dev/null
# 使用 pigz 并指定压缩率 5
set compress_tool "-I 'pigz -5'"
set -l core_count (nproc 2>/dev/null; or echo "多")
echo "⚡ 检测到 pigz,将使用 $core_count 核并行压缩 (Level 5)"
else
# 回退到标准 gzip
set compress_tool "-z"
echo "🐢 未检测到 pigz,使用标准 gzip 压缩"
end
# 3. 执行压缩逻辑
if test $arg_count -eq 1
# 逻辑 A:单个参数,生成同名 .tar.gz
# 去掉末尾斜杠以获取干净的名称
set -l name (string trim -r -c / $argv[1])
set -l target "$name.tar.gz"
echo "🚀 正在压缩单项目: $target"
# tar 默认保留软链接(对应 7z 的 -sni -snh 行为)
eval tar $compress_tool -cf "$target" "$argv[1]"
else
# 逻辑 B:多个参数,生成 package_时间戳.tar.gz
set -l timestamp (date "+%Y%m%d_%H%M%S")
set -l target "package_$timestamp.tar.gz"
echo "🚀 正在将 $arg_count 个项目打包至: $target"
eval tar $compress_tool -cf "$target" $argv
end
if test $status -eq 0
echo "✅ 压缩完成: $target"
else
echo "❌ 压缩过程中出现错误"
end
Executable
+49
View File
@@ -0,0 +1,49 @@
#!/usr/bin/env fish
# 预检:检查是否安装了 pigz
set -l has_pigz (command -v pigz)
for file in $argv
if not test -f "$file"
echo "错误: $file 不是有效文件"
continue
end
# 1. 获取不带后缀的文件名
set -l base_name (string replace -r '\.(tar\..*|tgz|tbz2|txz)$' '' $file | string replace -r '\.[^.]+$' '' )
# 2. 确定解压工具参数 (只包含工具,不包含 -x 或 -t)
set -l tool_opt ""
if test -n "$has_pigz"; and string match -qr '\.(gz|tgz)$' "$file"
set tool_opt "-I pigz"
echo "🚀 检测到 Gzip,使用 pigz 加速预览与解压"
end
# 3. 预检:预览内容并获取根项目
# 注意:这里只传 $tool_opt,后面显式接 -tf
set -l tar_output (eval tar $tool_opt -tf "$file" 2>/dev/null)
if test $status -ne 0
echo "❌ 错误: 无法读取 $file,文件可能损坏或格式不支持"
continue
end
# 提取根目录项目:过滤掉 ./ 并在第一个 / 处截断
set -l root_items (echo $tar_output | string replace -r '^\./' '' | string split -f 1 / | sort -u | string collect -n)
set -l item_count (count $root_items)
if test $item_count -eq 0
echo "跳过: $file 内容为空"
continue
end
# 4. 智能判断执行
if test $item_count -gt 1
echo "📦 检测到多个根项目 ($item_count),解压至目录: $base_name/"
mkdir -p "$base_name"
eval tar $tool_opt -xf "$file" -C "$base_name"
else
echo "📄 检测到单个根项目 ($root_items[1]),直接解压..."
eval tar $tool_opt -xf "$file"
end
end
Executable
+55
View File
@@ -0,0 +1,55 @@
#!/usr/bin/env fish
for file in $argv
if not test -f "$file"
echo "错误: $file 不是有效文件"
continue
end
# 1. 获取不带后缀的文件名 (例如 temp.zip -> temp)
set -l base_name (string replace -r '\.[^.]+$' '' (basename "$file"))
# 2. 预检:获取压缩包顶级路径,并过滤掉系统垃圾
set -l all_paths (7z l -slt "$file" | grep "^Path = " | string replace -r '^Path = ' '')
set -l root_items
for p in $all_paths
# 只取路径的第一级
set -l root (string split -m 1 / $p)[1]
# 排除 macOS 垃圾和空字符,且去重
if not contains -- "$root" $root_items
if not string match -qr '^(__MACOSX|\.DS_Store|archive_temp)$' "$root"
set -a root_items "$root"
end
end
end
set -l item_count (count $root_items)
if test $item_count -eq 0
echo "跳过: $file 是空的或仅包含系统垃圾文件"
continue
end
# 3. 核心智能判断逻辑
set -l need_folder true
if test $item_count -eq 1
# 情况 1: 只有一个根项目,直接解压
set need_folder false
else if contains -- "$base_name" $root_items
# 情况 2: 有多个项目,但其中一个文件夹的名字和压缩包同名
# 这通常意味着“自带容器”,为了防止嵌套,直接解压
set need_folder false
echo "💡 检测到包内已包含同名容器 '$base_name/',将跳过额外目录创建..."
end
# 4. 执行解压
if test "$need_folder" = true
echo "📦 检测到多个根项目 ($item_count),解压至目录: $base_name/"
mkdir -p "$base_name"
7z x -sni -mmt=on "$file" -o"$base_name"
else
echo "📄 结构清晰,直接解压..."
7z x -sni -mmt=on "$file"
end
end
Executable
+24
View File
@@ -0,0 +1,24 @@
#!/usr/bin/env fish
# 把之前定义的 zp 函数内容贴进来,去掉外层的 function/end
set -l arg_count (count $argv)
# 检查是否有输入参数
if test $arg_count -eq 0
echo "用法: zp <文件或目录1> [文件或目录2] ..."
return 1
end
if test $arg_count -eq 1
# 逻辑 A:单个参数,保持原样生成同名 zip
set -l name (string trim -r -c / $argv[1])
set -l target "$name.zip"
echo "🚀 正在多线程压缩单项目: $target"
7z a -sni -snh -tzip -mmt=on -mx=5 "$target" "$argv[1]"
else
# 逻辑 B:多个参数,生成 package_20251219_1540.zip
set -l timestamp (date "+%Y%m%d_%H%M%S")
set -l target "package_$timestamp.zip"
echo "🚀 正在将 $arg_count 个项目打包至: $target"
# 直接传入 $argv,7z 会自动处理多个路径
7z a -sni -snh -tzip -mmt=on -mx=5 "$target" $argv
end
+87 -151
View File
@@ -1,6 +1,4 @@
# ============================================================================= # 兼容性添加 PATH
# 1. 环境配置 & 路径兼容
# =============================================================================
if functions -q fish_add_path if functions -q fish_add_path
fish_add_path ~/.flinty/bin fish_add_path ~/.flinty/bin
else else
@@ -19,26 +17,31 @@ set -g fish_greeting ""
function fish_greeting function fish_greeting
echo "" echo ""
# 顶部欢迎与 补正后的时区时间 # 1. 顶部欢迎与 UTC-8 时间
set_color -o cyan set_color -o cyan
echo "Welcome back, $USER" echo "Welcome back, $USER"
# 在 TZ 环境变量中,GMT-8 指向八区 (北京时间) # 在 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 (Asia/Shanghai): $current_time" echo "Time (UTC-8): $current_time"
set_color normal set_color normal
echo "" echo ""
# 包管理器逻辑 (优先检查 oma) # 3. 包管理器逻辑 (优先检查 oma)
set -l pm_name "" set -l pm_name ""
if type -q oma if type -q oma
set pm_name (set_color -o green)"oma"(set_color normal) set pm_name (set_color -o green)"oma"(set_color normal)
else else
# 回退到系统默认包管理器 # 回退到系统默认包管理器
if type -q brew; set pm_name "Homebrew" if type -q brew
else if type -q apt; set pm_name "apt" set pm_name "Homebrew"
else if type -q pacman; set pm_name "pacman" else if type -q apt
else if type -q dnf; set pm_name "dnf" set pm_name "apt"
else; set pm_name "Default PM" else if type -q pacman
set pm_name "pacman"
else if type -q dnf
set pm_name "dnf"
else
set pm_name "Default PM"
end end
end end
@@ -46,157 +49,111 @@ function fish_greeting
echo "" echo ""
end end
# ============================================================================= ## 替换 ls 默认行为
# 2. 核心增强函数 (ls / eza 包装器) function ls --description 'alias ls to eza if possible'
# ============================================================================= # 1. 优先使用系统安装的 eza (PATH 里的)
function ls --description 'alias ls to eza with directory `.tldr` descriptions'
# 1. 核心路由:确定可用的 eza 二进制文件路径(继承你的多架构判定)
set -l eza_bin ""
if type -q eza if type -q eza
set eza_bin "eza" eza -la --icons $argv
else
set -l arch (uname -m)
set -l target_bin ""
switch $arch
case x86_64
if test -f /etc/alpine-release
set target_bin "eza_x86_64-unknown-linux-musl"
else
set target_bin "eza_x86_64-unknown-linux-gnu"
end
case aarch64 arm64
set target_bin "eza_aarch64-unknown-linux-gnu"
end
set -l custom_eza "$HOME/.flinty/bin/$target_bin"
if test -n "$target_bin"; and test -x "$custom_eza"
set eza_bin "$custom_eza"
end
end
# 2. 兜底策略:如果最终没有找到任何 eza,完全回退到原生 command ls
if test -z "$eza_bin"
command ls -la $argv
return return
end end
# 3. 动态描述注入核心引擎 # 2. 如果系统没有,尝试根据架构寻找 ~/.flinty/bin 下的二进制文件
# 建立展示行:带颜色、带图标、全长格式 (-la 是你预期的默认行为) set -l arch (uname -m)
set -l lines ($eza_bin -la --icons=always --color=always $argv) set -l target_bin ""
set -l bin_path "$HOME/.flinty/bin"
# 建立纯净路径行:过滤掉所有格式化干扰项,确保只拿到绝对路径 switch $arch
# 必须保留你的自定义排序/过滤参数(如 --sort),但剔除 -l 和 --icons case x86_64
set -l clean_args # 如果是 Alpine Linux,通常需要用 musl 版本 (根据你提供的文件名)
for arg in $argv if test -f /etc/alpine-release
switch $arg set target_bin "eza_x86_64-unknown-linux-musl"
case '-l' '--long' '--icons' else
# 忽略影响长格式和图标的参数 set target_bin "eza_x86_64-unknown-linux-gnu"
case '-la' '-al' '-lA' '-Al'
# 如果是组合参数,剥离掉 'l',保留 'a' 或 'A' 保证文件对齐
set -l stripped (string replace -a 'l' '' $arg)
if test "$stripped" != "-"
set -a clean_args $stripped
end
case '*'
set -a clean_args $arg
end
end
# 核心修正:只用 -a(显示隐藏)和 -1(单列),配合 --absolute=on 拿到纯路径
set -l paths ($eza_bin -a -1 --absolute=on --color=never $clean_args 2>/dev/null)
# 安全网:如果由于特殊参数导致行数不匹配,安全回退到原装输出防止错位
if test (count $lines) -ne (count $paths)
$eza_bin -la --icons=always $argv
return
end
# 双路循环渲染
for i in (seq (count $lines))
set -l line $lines[$i]
set -l target_path $paths[$i]
# 此时 $target_path 是完美的纯绝对路径,test 能够精准命中
if test -d "$target_path"; and test -f "$target_path/.tldr"
set -l desc (head -n 1 "$target_path/.tldr" | string trim)
if test -n "$desc"
# 在行尾追加青色 (Cyan) 的备忘后缀
echo -e "$line \e[36m<- $desc\e[0m"
continue
end end
end case aarch64 arm64
echo -e "$line" set target_bin "eza_aarch64-unknown-linux-gnu"
end end
set -l custom_eza "$bin_path/$target_bin"
# 3. 检查文件是否存在且可执行
if test -n "$target_bin"; and test -x "$custom_eza"
$custom_eza -la --icons $argv
return
end
# 4. 既没有系统 eza 也没有本地二进制,回退到 command ls
command ls -la $argv
end end
## 按修改时间排序列出文件 (由于 ls 已增强,此命令自动继承备忘显示) ## 按修改时间排序列出文件
function lt --description 'ls sorted by time' function lt --description 'ls sorted by time'
ls --sort=modified $argv ls --sort=modified $argv
end end
# =============================================================================
# 3. 运维与效率工具函数
# =============================================================================
## 快捷为目录添加或查看备忘贴纸
function tldr --description 'Add or view description note for a directory'
if test (count $argv) -eq 0
echo "Usage: tldr \"你的项目描述\" [目录路径]"
echo " Or: tldr -d [目录路径] (删除备忘)"
return 1
end
if test "$argv[1]" = "-d"
set -l target_dir "."
if test (count $argv) -gt 1; set target_dir $argv[2]; end
if test -f "$target_dir/.tldr"
rm "$target_dir/.tldr"
echo "已移除 '$target_dir' 的备忘贴纸。"
end
return 0
end
set -l desc $argv[1]
set -l target_dir "."
if test (count $argv) -gt 1; set target_dir $argv[2]; end
if not test -d "$target_dir"
echo (set_color -o red)"Error: $target_dir 不是一个有效的目录"(set_color normal)
return 1
end
echo "$desc" > "$target_dir/.tldr"
echo "成功贴上标签 ➜ 有效目录: '$target_dir' [ $desc ]"
end
## 更新配置 ## 更新配置
function dotu function dotu
set -l current_dir (pwd) set -l current_dir (pwd)
cd $HOME/.flinty cd $HOME/.flinty
if git pull if git pull
source ~/.config/fish/config.fish source ~/.config/fish/config.fish
echo "Config reloaded successfully!" echo "Config reloaded successfully!"
end end
# 回到原位
cd $current_dir cd $current_dir
end end
## 修复某些命令行工具导致的光标消失 ## 修复光标消失
function restore_cursor --on-event fish_postexec function restore_cursor --on-event fish_postexec
tput cnorm tput cnorm
end end
## 自动递增探测可用端口 ## 让 sudo 能够识别自定义 bin 下的脚本
function portcheck function sudo --description "Replacement for sudo that preserves custom PATH commands"
set -l port 8840 # 1. 如果没有任何参数,直接运行原始 sudo (通常显示帮助)
if test (count $argv) -gt 0; set port $argv[1]; end if not set -q argv[1]
command sudo
return
end
# 2. 如果第一个参数是以 "-" 开头的选项 (比如 -i, -s, -u, -E)
# 我们直接把所有参数原样传给真正的 sudo,不做路径解析
if string match -q -- "-*" $argv[1]
command sudo $argv
return
end
# 3. 如果第一个参数是普通的命令名 (比如 zp, apt, vim)
# 使用 type -p 获取其完整路径。使用 -- 防止命令名本身带杠导致 type 报错
set -l command_path (type -p -- $argv[1] 2>/dev/null)
if test -n "$command_path"
# 找到了完整路径,调用真正的 sudo 运行该绝对路径
command sudo $command_path $argv[2..-1]
else
# 没找到路径(可能是内建命令或拼写错误),直接交给真正的 sudo 处理
command sudo $argv
end
end
function portcheck
# 设置起始端口,如果没有传入参数则默认为 8840
set -l port 8840
if test (count $argv) -gt 0
set port $argv[1]
end
# 循环检查端口是否被占用
# -t: TCP, -u: UDP, -l: Listening, -n: Numeric
while ss -tuln | grep -q ":$port " while ss -tuln | grep -q ":$port "
set port (math $port + 1) set port (math $port + 1)
end end
echo $port echo $port
end end
## Yazi 联动:退出时自动切换到最后所在的目录
function y function y
set -l tmp (mktemp -t "yazi-cwd.XXXXXX") set -l tmp (mktemp -t "yazi-cwd.XXXXXX")
yazi $argv --cwd-file="$tmp" yazi $argv --cwd-file="$tmp"
@@ -206,28 +163,7 @@ function y
rm -f -- "$tmp" rm -f -- "$tmp"
end end
# =============================================================================
# 4. 别名与缩写 (Abbr / Alias)
# =============================================================================
abbr -a cc 'claude --permission-mode bypassPermissions'
abbr -a port 'sudo ss -tulnp | grep' abbr -a port 'sudo ss -tulnp | grep'
abbr -a process 'sudo ps aux | grep' abbr -a process 'ps aux | grep'
abbr -a service 'sudo systemctl list-units --type=service --all | grep'
alias fastfetch="fastfetch --color-keys blue" alias fastfetch="fastfetch --color-keys blue"
## 会话级代理控制
function proxy --description 'Set HTTP proxy for current session'
echo -n "HTTP proxy address (e.g. http://192.168.5.14:6152): "
read proxy_addr
if test -n "$proxy_addr"
set -gx HTTP_PROXY "$proxy_addr"
set -gx HTTPS_PROXY "$proxy_addr"
echo "Proxy set: $proxy_addr"
else
echo "Proxy cleared"
set -e HTTP_PROXY
set -e HTTPS_PROXY
end
end
-1
View File
@@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILji+qkI6zDXSfTI1QRP+LCSoJrkI9uvHLzu0qxpq2yM
-1
View File
@@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICXq+d3KevzPH2FT4s3h9t04TV4h/URkS7g9mn4mJoG3
+70 -73
View File
@@ -3,11 +3,6 @@ Host *
IdentityFile ~/.flinty/ssh/%n.pub IdentityFile ~/.flinty/ssh/%n.pub
ForwardAgent yes ForwardAgent yes
Host git.mitsea.com
HostName git.mitsea.com
User git
IdentityFile ~/.flinty/ssh/app-gitea-selfhost.pub
Host inc-r750xa Host inc-r750xa
HostName 10.0.24.20 HostName 10.0.24.20
User ubuntu User ubuntu
@@ -20,38 +15,64 @@ Host inc-xe9680
HostName 10.0.24.40 HostName 10.0.24.40
User flintylemming User flintylemming
Host inc-truenas
HostName 172.16.48.132
User flintylemming
Host inc-dev-et
HostName 192.168.97.4
User flintylemming
IdentityFile ~/.flinty/ssh/inc-dev.pub
Host inc-radxa
HostName 172.16.49.114
User flintylemming
Host inc-backup-server Host inc-backup-server
HostName 10.0.88.33 HostName 10.0.88.33
User aiteam User aiteam
Host inc-dev Host inc-edr1
HostName 172.16.48.99 HostName 10.0.24.21
User flintylemming User flintylemming
Host inc-mac-mini-m4 Host inc-edr2
HostName 172.16.48.68 HostName 10.0.24.27
User flintylemming
Host inc-ldns-dt-1221
HostName 10.0.24.40
Port 8851
User flintylemming
Host inc-qts
HostName 172.16.49.43
User FlintyLemming
Host inc-dev-temp
HostName 10.0.24.26
User flintylemming User flintylemming
Host inc-ai-max-395 Host inc-ai-max-395
HostName 172.16.48.2 HostName 172.16.48.146
User flintylemming User flintylemming
Host idc-ucloud Host idc-ucloud
HostName 113.31.174.4 HostName 113.31.174.4
User flintylemming User root
Host idc-aliyun-sh Host idc-aliyun-sh
HostName 47.100.113.57 HostName 47.100.113.57
User flintylemming User ecs-user
Host idc-aws-sg Host idc-aws-sg
HostName 52.220.5.200 HostName 52.220.5.200
User ubuntu User admin
Host idc-aws-sg-hf Host idc-aws-sg-hf
HostName 112.31.107.190 HostName 112.31.107.190
Port 8848 Port 8848
User flintylemming User admin
IdentityFile ~/.flinty/ssh/idc-aws-sg.pub IdentityFile ~/.flinty/ssh/idc-aws-sg.pub
Host idc-hf-linux Host idc-hf-linux
@@ -66,6 +87,17 @@ Host idc-hf-qts
User FlintyLemming User FlintyLemming
IdentityFile ~/.flinty/ssh/hf-qts.pub IdentityFile ~/.flinty/ssh/hf-qts.pub
Host idc-nj-fnos-v6
HostName nj-fnos-v6.mitsea.com
User FlintyLemming
IdentityFile ~/.flinty/ssh/nj-fnos.pub
Host idc-nj-fnos
HostName 112.31.107.190
Port 8842
User FlintyLemming
IdentityFile ~/.flinty/ssh/nj-fnos.pub
Host idc-hf-truenas Host idc-hf-truenas
HostName 112.31.107.190 HostName 112.31.107.190
Port 8849 Port 8849
@@ -78,10 +110,25 @@ Host idc-hf-truenas-v6
IdentityFile ~/.flinty/ssh/hf-truenas.pub IdentityFile ~/.flinty/ssh/hf-truenas.pub
IdentitiesOnly yes IdentitiesOnly yes
Host idc-hk-iepl-v6
HostName 2408:8756:f5f:2a01:1:97a0:bb77:ff0d
User root
IdentityFile ~/.flinty/ssh/idc-hk-iepl.pub
Host idc-hk-iepl-hf-v4
HostName 112.31.107.190
Port 8843
User root
IdentityFile ~/.flinty/ssh/idc-hk-iepl.pub
Host idc-aliyun-sg Host idc-aliyun-sg
HostName 47.237.137.245 HostName 47.237.137.245
User root User root
Host idc-yxvm
HostName 64.49.47.21
User root
Host idc-vultr-bgp Host idc-vultr-bgp
HostName 137.220.34.171 HostName 137.220.34.171
User root User root
@@ -90,27 +137,6 @@ Host idc-dmit-lax
HostName 69.63.202.73 HostName 69.63.202.73
User root User root
Host idc-ovh-ks2
HostName 145.239.244.171
User flintylemming
Host idc-zouter-hk
HostName 103.97.200.27
User root
Host idc-tencent-sg
HostName 43.134.27.201
User flintylemming
Host idc-sg
HostName 188.253.120.21
User debian
Host hf-linux-proxy
HostName 192.168.5.10
User flintylemming
IdentityFile ~/.flinty/ssh/hf-linux.pub
Host hf-linux Host hf-linux
HostName 192.168.5.12 HostName 192.168.5.12
User flintylemming User flintylemming
@@ -127,30 +153,14 @@ Host hf-network-server
HostName 192.168.5.9 HostName 192.168.5.9
User flintylemming User flintylemming
Host hf-macmini Host nj-fnos
HostName 192.168.5.12 HostName 192.168.2.6
User flintylemming
Host hf-archived
HostName 192.168.5.80
User flintylemming
Host hf-restic
HostName 192.168.5.8
User FlintyLemming User FlintyLemming
Host nj-nanopi-neo3 Host nj-nanopi-neo3
HostName 192.168.2.10 HostName 192.168.2.10
User root User root
Host nj-nas
HostName 192.168.5.80
User flintylemming
Host nj-linux
HostName 192.168.2.12
User flintylemming
Host zs-zos Host zs-zos
HostName 192.168.6.6 HostName 192.168.6.6
Port 10000 Port 10000
@@ -161,27 +171,14 @@ Host sdwan-us-la
User root User root
IdentityFile ~/.flinty/ssh/us-la.pub IdentityFile ~/.flinty/ssh/us-la.pub
Host frp-us-la
HostName 112.31.107.190
User root
Port 7012
IdentityFile ~/.flinty/ssh/us-la.pub
Host frp-inc-xe9680 Host frp-inc-xe9680
HostName frp-fee.com HostName 112.31.107.190
User flintylemming User flintylemming
Port 31427 Port 7010
IdentityFile ~/.flinty/ssh/inc-xe9680.pub IdentityFile ~/.flinty/ssh/inc-xe9680.pub
Host mtk-genio Host frp-inc-r750xa
HostName 172.16.48.130 HostName 112.31.107.190
User ubuntu
Host kirin-990-pc
HostName 172.16.48.195
User flintylemming User flintylemming
Port 7011
Host ca-linux IdentityFile ~/.flinty/ssh/inc-r750xa.pub
HostName 70.66.137.94
User flintylemming
Port 8840
-1
View File
@@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEUg0TPLm/KxccyIqCwlL+En8e3uu/D2hCdv6YH0Z9J7
-1
View File
@@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKO5yxcEPfTcnlX0EEez5SvDBNt74ofKR/QKON2KEVEe
+1 -1
View File
@@ -1 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMFf1rVv76W9EzRrcnpC0gGzAuj4fZDuqsEs38wRGArL ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJWqqDs8y2g7xRIf7HkVKMnaV5NISnPEGnlHBvFcJy/Y
-1
View File
@@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOAp/giPKiUtztJ8O4OeHbBCCVn/aov9l56pKnu/YKqd
-1
View File
@@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPnjgQlDFFEW5kKdiKfKwu0t8jEQplAP3qTfHEXd9aN/
-1
View File
@@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB2ifq+UpmNzskfhKd2I2pEfKHjbG7vxVTL9W8JDD3EC
-1
View File
@@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKd1/ECqDbyxgpY5qt6x5SVVPXKoVX1Lm/isN0YyJ4FW
-1
View File
@@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH1g4zrd1TSSJJQTZ2XNEFMV+/H6/KPAKhNEGOKdJT6q
+1
View File
@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFK9/NvPjti5NlwABrVrimUJdc1ilwCXKKCCaeO5YfvW
-1
View File
@@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIVgTG/mqTyhyFrs/kjH2GlurDFcLRc0Mu3BI1dg1vhc
+1
View File
@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBEGz0gbLl0WdPZ7KKdd6dwuJsEZNbNjqJVgrOZjiPQW
+1
View File
@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE5dH0cUYvCMZQPo0hXRSK9NXl8hQGGodrj24q9XZIuH
+1
View File
@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH9LCdVn9Awo0GYgFGBJ0iuX5aLpZaLEZXJTqXJu5urC
-1
View File
@@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDotRuSdDlum7HFcFqYV6V6eEszpsj70H91RAGtOEQ5F
+1
View File
@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGX76ty7gCXE9vhwlXlxY6JWq720EHH+rXFmzya1cMgV
+1
View File
@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKgZWk0H8AvR0NojqEKwEWTximPhhqwN4atJvaaNYQe/
+1
View File
@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA5+PuaLTqGeTZsO5/9ZtdjIZQ7AzVWECTZF9Fd11FFA
-1
View File
@@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAc3/NU8F61BoKl5zSwJBjkdPilQgd4fHLxlYDD0EonK
-1
View File
@@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBp2FjMNbIYkvUuxFhNdkUAJ2whs8ZFSvUa0C97SXead
View File
-1
View File
@@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEUg0TPLm/KxccyIqCwlL+En8e3uu/D2hCdv6YH0Z9J7