问题描述
我正在查看 gitflow-avh(虚拟家庭版)1.12.3 版的源代码,它随 Git for Windows 2.31.1 版一起提供。我正在查看脚本 git-flow 的第 67-73 行。
*MINGW*)
export GITFLOW_DIR=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
pwd () {
builtin pwd -W
}
;;
*)
# The sed expression here replaces all backslashes by forward slashes.
# This helps our Windows users,while not bothering our Unix users.)
export GITFLOW_DIR=$(dirname "$(echo "$0" | sed -e 's,g')")
;;
esac
什么是 -W
选项?我只知道 bash 中的 -L
和 -P
。我相当确信这是一种“MINGW 主义”,但我无法在线查找文档。
有人知道 -W
选项的作用吗?
解决方法
好的,所以我发现这特别与 MSYS2
有关,而不是 MINGW
。
根据 MSYS2's website,“MSYS2 与 Cygwin 有何不同?”:
我必须自己运行 MSYS2
才能真正看到 -W
选项提供了什么: