OSSP CVS Repository

ossp - Check-in [4759]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 4759
Date: 2004-Oct-22 23:17:44 (local)
2004-Oct-22 21:17:44 (UTC)
User:rse
Branch:
Comment: fix editor handling
Tickets:
Inspections:
Files:
ossp-pkg/due/.due/due.editor.sh      1.2 -> 1.3     1 inserted, 6 deleted
ossp-pkg/due/.due/due.util.sh      1.2 -> 1.3     2 inserted, 2 deleted

ossp-pkg/due/.due/due.editor.sh 1.2 -> 1.3

--- due.editor.sh        2004/10/22 19:32:52     1.2
+++ due.editor.sh        2004/10/22 21:17:44     1.3
@@ -32,19 +32,14 @@
 
 #   determine best editor
 export EDITOR
-set -x
 EDITOR=`find_tool vim vi`
 if [ ".$EDITOR" = .vim ]; then
     alias vi=vim
     alias pi='vim "+set patchmode=.orig"'
 fi
 if [ ".$TERM" != ".$TERM_COLOR" ]; then
-    case "$EDITOR" in
-        /* ) ;;
-        * ) eval "function $EDITOR () { TERM=\$TERM_COLOR command $EDITOR \${1+\"\$@\" }" ;;
-    esac
+    eval "function $EDITOR () { TERM=\$TERM_COLOR command $EDITOR \${1+\"\$@\"}; }"
 fi
-set +x
 
 #   determine best pager
 export PAGER


ossp-pkg/due/.due/due.util.sh 1.2 -> 1.3

--- due.util.sh  2004/10/22 19:32:52     1.2
+++ due.util.sh  2004/10/22 21:17:44     1.3
@@ -118,8 +118,8 @@
     local tool=""
     local name
     for name in "$@"; do
-        tool=`type -p $name`
-        if [ -n $tool ]; then
+        if [ ".`type -p $name`" != . ]; then
+            tool="$name"
             break
         fi
     done

CVSTrac 2.0.1