2021-07-29 00:37:35 -07:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
# YES_ZSH
|
2021-07-29 05:44:12 -07:00
|
|
|
# YES_BASH
|
|
|
|
# YES_DASH
|
2021-07-29 00:37:35 -07:00
|
|
|
|
2021-08-01 09:27:25 -07:00
|
|
|
explore() { ### @- open a single directory in `explorer.exe`, defaulting to `$PWD`.
|
2021-07-29 05:44:12 -07:00
|
|
|
[ -n "$MSYSTEM" ] || { printf "%s\n" "$0: only for MSYS2" >&2; return 1; }
|
2021-07-29 00:37:35 -07:00
|
|
|
[ $# -le 1 ] || { printf "%s\n" "$0: too many arguments" >&2; return 1; }
|
|
|
|
explorer "$(cygpath -w "${1:-.}")"
|
|
|
|
}
|
|
|
|
|
2021-08-02 13:48:46 -07:00
|
|
|
[ -n "${preload+-}" ] || explore "$@"
|