shcommand-line-argumentspwd

Did `pwd` use to have a `-W` option?


I am reviewing the source code for gitflow-avh (A VirtualHome edition), version 1.12.3, which ships with Git for Windows, version 2.31.1. I'm looking at lines 67-73 of the script git-flow.

*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

What is the -W option? I'm only aware of -L and -P in bash. I'm fairly confident this is a "MINGW-ism", but I'm having trouble finding documentation online.

Does anyone know what the -W option does?


Solution

  • Ok, so I found this specifically has to do with MSYS2, as opposed to MINGW.

    Per MSYS2's website, "How does MSYS2 differ from Cygwin?":

    How_MSYS2_differs_from_Cygwin

    I had to run MSYS2 itself to actually see what the -W option provided:

    MSYS2_pwd_w_option