Skip to content

Commit

Permalink
Merge pull request #61 from mobilemind/quote-vars-for-echo-log-exec
Browse files Browse the repository at this point in the history
quote vars more often in assignment & arguments
  • Loading branch information
aurora authored Jun 23, 2017
2 parents f880219 + 195a13c commit b353383
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rmate
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function canonicalize {
result="$dir/$result"
fi
fi
echo $result
echo "$result"
}

while [[ "${1:0:1}" = "-" || "$1" =~ ^\+([0-9]+)$ ]]; do
Expand Down Expand Up @@ -193,7 +193,7 @@ while [[ "${1:0:1}" = "-" || "$1" =~ ^\+([0-9]+)$ ]]; do
verbose=true
;;
--version)
echo $version_string
echo "$version_string"
exit 1
;;
-h|-\?|--help)
Expand Down Expand Up @@ -249,7 +249,7 @@ function open_file {

if [ "$filepath" != "-" ]; then
realpath=`canonicalize "$filepath"`
log $realpath
log "$realpath"

if [ -d "$filepath" ]; then
echo "$filepath is a directory and rmate is unable to handle directories."
Expand Down Expand Up @@ -381,7 +381,7 @@ function handle_connection {

# connect to textmate and send command
#
exec 3<> /dev/tcp/$host/$port
exec 3<> "/dev/tcp/$host/$port"

if [ $? -gt 0 ]; then
echo "Unable to connect to TextMate on $host:$port"
Expand Down

0 comments on commit b353383

Please sign in to comment.