diff --git a/.local/bin/run0edit b/.local/bin/run0edit index 0909e39..279f419 100755 --- a/.local/bin/run0edit +++ b/.local/bin/run0edit @@ -54,6 +54,12 @@ clean_tempfiles() { rm --force "${tempfile}" "${tempfile}.orig" } +if [ "$#" -ne "1" ]; then + echo "Expected exactly one input file. Usage:" 1>&2 + echo " $0 FILE" 1>&2 + exit 1; +fi + editor_cmd="$(default_editor)" echo "Editing using the command \"${editor_cmd}\""