Browse Source

update o function

pull/1/head
10sr 12 years ago
parent
commit
3ec97fc85c
1 changed files with 24 additions and 15 deletions
  1. +24
    -15
      bashrc

+ 24
- 15
bashrc View File

@@ -91,8 +91,8 @@ alias psall="ps auxww"
alias q=exit
alias p="$PAGER"
alias c=cat
alias sudo="sudo " # use aliases through sudo
alias e3=e3em
alias sudo="sudo " # use aliases through sudo
alias halt="sudo halt"
alias reboot="sudo reboot"
alias rand="echo \$RANDOM"
@@ -239,24 +239,33 @@ setclip(){
fi
fi
}
o(){
if [ $# -eq 0 ]
then
local f=.
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"
else
local f="$1"
alias _open_file="LC_MESSAGES= xdg-open"
fi
if iswindows
then
cmd.exe //c start "" "$f"
elif isdarwin
then
open "$f"
elif type pcmanfm >/dev/null 2>&1
else
alias _open_file=cat
fi
o(){
if test $# -eq 0
then
LC_MESSAGES= pcmanfm "$f"
_open_file . &
else
LC_MESSAGES= xdg-open "$f"
for f in "$@"
do
if test -d $f
then
_open_file $f &
else
_open_file $f
fi
done
fi
}
convmv-sjis2utf8-test(){


Loading…
Cancel
Save