X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=.shellrc;h=b6c98926e00b4d9aa8f9af5ec8f02d18ece36831;hb=410a90591f3a7bd92cf7af59ddeafe72d20e3a25;hp=565347d3eabb9791c7ef235d578395bdb03e3100;hpb=516782105f9eabd3ea0dd79311b584a12e7cdbaf;p=dotfiles.git diff --git a/.shellrc b/.shellrc index 565347d..b6c9892 100644 --- a/.shellrc +++ b/.shellrc @@ -75,13 +75,13 @@ esac #PWd() { pwd | sed "s/.*\/\(.*\)\/\(.*\)/...\/\2/"; } -psg() { ps auxw | grep -i ${1:+"$@"} | grep -v '\(ps auxw\|grep\)'; } -pswg() { ps auxwww | grep -i ${1:+"$@"} | grep -v '\(ps auxw\|grep\)'; } +psg() { ps auxw | grep -i ${1:+"$@"} | grep -v '\(ps auxw\|grep\)'; } +pswg() { ps auxwww | grep -i ${1:+"$@"} | grep -v '\(ps auxw\|grep\)'; } # Like pgrep -f pidOf() { ps auxwww | grep -i ${1:+"$@"} | grep -v '\(ps auxw\|grep\|pidOf\|KillAll\)' | awk '{print $2}'; } -# A kind of pkill +# A kind of pkill/killall KillAll() { if [ -z "$2" ]; then kill `pidOf "$1"` @@ -153,15 +153,13 @@ mc() { mc_type="`mc_type.py $mc`" if [ "$mc_type" = old ]; then $mc -P $MC_SLOW $MC_XTERM "$@" > "$MC_PWD_FILE" - rc=$? - MC_FOUND=YES elif [ "$mc_type" = new ]; then $mc -P "$MC_PWD_FILE" $MC_SLOW $MC_XTERM "$@" - rc=$? - MC_FOUND=YES else continue fi + rc=$? + MC_FOUND=YES cd "`cat \"$MC_PWD_FILE\"`" && /bin/rm "$MC_PWD_FILE" break fi