Skip to content

Commit

Permalink
Merge pull request #41 from schinckel/patch-3
Browse files Browse the repository at this point in the history
Use stdin if not a tty (or --wait is provided)
  • Loading branch information
aurora committed May 23, 2015
2 parents 690072b + 9139c41 commit c6198fa
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions rmate
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,19 @@ done
filepath="$1"

if [ "$filepath" = "" ]; then
showusage
exit 1
if [[ $nowait = false ]]; then
filepath='-'
else
case "$-" in
*i*)
showusage
exit 1
;;
*)
filepath='-'
;;
esac
fi
fi

shift
Expand Down

0 comments on commit c6198fa

Please sign in to comment.