function cdd() {
local dir=$1
if [ "$dir" = ".." ]; then
cd ..
return
fi
local matches=$(ll | awk '{print $9}' | grep "$dir")
local match_count=$(echo "$matches" | wc -l)
if [ $match_count -eq 0 ]; then
echo "未找到匹配的目录: $dir"
elif [ $match_count -eq 1 ]; then
cd "$matches"
else
choice=$(echo "$matches" | fzf)
if [ -n "$choice" ]; then
cd "$choice"
fi
fi
}
上一篇

乙巳孟夏,丁巳迄戊午,某幸随领导巡行广州、顺德、深圳诸邑。
2025-05-12
下一篇

使用命令通过 VS Code 打开文件/文件夹
2025-03-13