mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
24 lines
325 B
Bash
24 lines
325 B
Bash
# Universal file opener
|
|
|
|
case "$OSTYPE" in
|
|
cygwin)
|
|
opener="cygstart"
|
|
;;
|
|
linux*)
|
|
opener="xdg-open"
|
|
;;
|
|
darwin*)
|
|
opener="open"
|
|
;;
|
|
*)
|
|
opener=""
|
|
;;
|
|
esac
|
|
|
|
function o {
|
|
for i in $*; do
|
|
if [ "$opener" != "" ]; then
|
|
$opener "$i"
|
|
fi
|
|
done
|
|
}
|