|
@@ -321,32 +321,37 @@ setclip(){ |
|
|
fi |
|
|
fi |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if iswindows; then |
|
|
|
|
|
alias _open_file='cmd.exe //c start ""' |
|
|
|
|
|
elif isdarwin; then |
|
|
|
|
|
alias _open_file=open |
|
|
|
|
|
elif islinux; then |
|
|
|
|
|
if null type pcmanfm; then |
|
|
|
|
|
alias _open_file="LC_MESSAGES= pcmanfm" |
|
|
|
|
|
|
|
|
_open_file(){ |
|
|
|
|
|
if iswindows |
|
|
|
|
|
then |
|
|
|
|
|
cmd.exe //c start "" "$@" |
|
|
|
|
|
elif isdarwin |
|
|
|
|
|
then |
|
|
|
|
|
open "$@" |
|
|
|
|
|
elif islinux |
|
|
|
|
|
then |
|
|
|
|
|
if null type pcmanfm; then |
|
|
|
|
|
LC_MESSAGES= pcmanfm "$@" & |
|
|
|
|
|
else |
|
|
|
|
|
LC_MESSAGES= xdg-open "$@" |
|
|
|
|
|
fi |
|
|
else |
|
|
else |
|
|
alias _open_file="LC_MESSAGES= xdg-open" |
|
|
|
|
|
|
|
|
cat "$@" |
|
|
fi |
|
|
fi |
|
|
else |
|
|
|
|
|
alias _open_file=cat |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
o(){ |
|
|
o(){ |
|
|
if test $# -eq 0 |
|
|
if test $# -eq 0 |
|
|
then |
|
|
then |
|
|
_open_file . >/dev/null 2>&1 & |
|
|
|
|
|
|
|
|
_open_file . |
|
|
else |
|
|
else |
|
|
for f in "$@" |
|
|
for f in "$@" |
|
|
do |
|
|
do |
|
|
if test -d $f |
|
|
|
|
|
|
|
|
if test -d "$f" |
|
|
then |
|
|
then |
|
|
_open_file $f >/dev/null 2>&1 & |
|
|
|
|
|
|
|
|
_open_file "$f" |
|
|
else |
|
|
else |
|
|
_open_file $f >/dev/null 2>&1 & |
|
|
|
|
|
|
|
|
_open_file "$f" |
|
|
fi |
|
|
fi |
|
|
done |
|
|
done |
|
|
fi |
|
|
fi |
|
|