- andforce2026-08-313247
unalias rm 2>/dev/null function rm { local args=() for arg in "$@"; do case "$arg" in -*) ;; # 跳过所有 flag ,只保留文件路径 *) args+=("$arg") ;; esac done if [[ ${#args[@]} -eq 0 ]]; then echo "rm: missing operand" return 1 fi trash "${args[@]}" } ```放到 Mac 的 ~/.zshrc 中,这样所有删除都会进入回收站主楼 - liuxue2026-08-3146918
如果 ai 不使用你的环境变量,不还是会出问题么
- ruanimal2026-09-0126061
你没有用过 trash-cli 吗? 另外 ai 很喜欢用绝对路径,alias 其实作用也不大
- cheng65632026-09-0144256
windows ,让 AI 糊了个 sbox.md ,sbox codex 这样启动 codex ,就建一个 sandboxie 区,只给当前目录设置完全访问,其他目录全走 sandboxie