From 58d6cff6c5a93d7cd3f9fe46df95e06f38dd9b5d Mon Sep 17 00:00:00 2001 From: adminroot Date: Sun, 12 Oct 2025 13:13:56 +0200 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20alias.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- alias.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/alias.txt b/alias.txt index ed04414..a209276 100644 --- a/alias.txt +++ b/alias.txt @@ -257,10 +257,8 @@ function 7zx() { local direct_pattern='\.(zip|7z|rar)$' if [[ "$lower_name" =~ $tar_pattern ]]; then - # 先解压外层(xz/gz/bz2/zst),再解tar 7z x -so "$archive" | 7z x -si -ttar -o"$outdir" elif [[ "$lower_name" =~ $direct_pattern ]]; then - # 直接解压 7z x "$archive" -o"$outdir" else echo "⚠️ 不支持的格式: $archive" >&2 @@ -272,7 +270,6 @@ function 7zxd() { local password="$1" local files=() - # 搜索所有压缩包(支持分卷 .part1.rar/.001) while IFS= read -r -d '' f; do files+=("$f") done < <(find . -maxdepth 1 -type f \( \ @@ -300,7 +297,6 @@ function 7zxd() { if [[ $? -eq 0 ]]; then echo "✅ 解压成功,删除源文件..." - # 删除所有相关分卷,如 .part1.rar .part2.rar 等或 .001/.002 local prefix="${file%%.*}" find . -maxdepth 1 -type f -regex "./$prefix\\..*" -delete else