Skip to content

Instantly share code, notes, and snippets.

@jcsalterego
Created April 3, 2017 21:49
Show Gist options
  • Save jcsalterego/be28cfa438e7c9e9f4fa3cc8dada95c3 to your computer and use it in GitHub Desktop.
Save jcsalterego/be28cfa438e7c9e9f4fa3cc8dada95c3 to your computer and use it in GitHub Desktop.
#!/bin/bash
# If there is a first argument and expansions do not match
if [ -n "$1" ] && [ ! -f "$1" ] && [ "$(echo $1*)" != "$1*" ]; then
echo "There are completions!: "$(echo $1*)
exit 1
else
$EDITOR $@
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment