Revision: 12595
          http://sourceforge.net/p/skim-app/code/12595
Author:   hofman
Date:     2021-12-02 15:13:31 +0000 (Thu, 02 Dec 2021)
Log Message:
-----------
set variables to empty instead of empty string, is equivalent

Modified Paths:
--------------
    trunk/displayline

Modified: trunk/displayline
===================================================================
--- trunk/displayline   2021-12-01 15:58:08 UTC (rev 12594)
+++ trunk/displayline   2021-12-02 15:13:31 UTC (rev 12595)
@@ -15,11 +15,11 @@
 fi
 
 # get arguments
-revert=""
-showing_bar=""
+revert=
+reading_bar=
 activate="activate"
 zerobased=
-from_source=""
+from_source=
 while [[ "${1:0:1}" == "-" ]]; do
   if [[ "$1" == "-r" || "$1" == "-revert" ]]; then
     revert="try
@@ -28,9 +28,9 @@
       if (count of theDocs) > 0 then revert theDocs
     end try"
   elif [[ "$1" == "-b" || "$1" == "-readingbar" ]]; then
-    showing_bar="with showing reading bar"
+    reading_bar="with showing reading bar"
   elif [[ "$1" == "-g" || "$1" == "-background" ]]; then
-    activate=""
+    activate=
   elif [[ "$1" == "-z" || "$1" == "-zerobased" ]]; then
     zerobased=1
   fi
@@ -39,13 +39,13 @@
 line=$1
 file="$2"
 shopt -s extglob
-[[ $# -gt 2 ]] && src="$3" || src=""
+[[ $# -gt 2 ]] && src="$3" || src=
 
 # expand relative paths
 [[ "${file:0:1}" == "/" ]] || file="${PWD}/${file}"
-[[ "${src}" == "" || "${src:0:1}" == "/" ]] || src="${PWD}/${src}"
+[[ -z "${src}" || "${src:0:1}" == "/" ]] || src="${PWD}/${src}"
 
-[[ "${src}" == "" ]] || from_source="from POSIX file \"$src\""
+[[ -z "${src}" ]] || from_source="from POSIX file \"$src\""
 
 [[ -z ${zerobased} ]] || (( line+=1 ))
 
@@ -55,7 +55,7 @@
   tell application "Skim"
     $revert
     open theFile
-    go document 1 to TeX line $line $from_source $showing_bar
+    go document 1 to TeX line $line $from_source $reading_bar
     $activate
   end tell
 EOF

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to