1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-05 04:29:03 -08:00
rc/sh/explore

14 lines
382 B
Text
Raw Normal View History

2021-07-29 00:37:35 -07:00
#!/usr/bin/env sh
# YES_ZSH
# YES_BASH
# YES_DASH
2021-09-23 06:48:05 -07:00
# 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 "$@"