1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-13 20:29:02 -08:00
rc/sh/explore

11 lines
376 B
Text
Raw Normal View History

2021-07-29 00:37:35 -07:00
#!/usr/bin/env sh
# YES_ZSH YES_BASH YES_DASH YES_ASH
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`.
[ -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:-.}")"
}
[ -n "${preload+-}" ] || explore "$@"