From 285d5039f21605996c9e42b86acabdfb59a0747c Mon Sep 17 00:00:00 2001 From: Ingo Karkat Date: Sun, 20 Nov 2011 14:26:52 +0100 Subject: [PATCH] Add shebang line and check for Bash. The shebang is ignored when sourcing the script (but still helps many text editors auto-detect the file type), and will cause an error when the script is mistakenly executed. The Bash check allows to have this called from a generic place (e.g. .profile), and do no harm when under a different shell. --- todo_completion | 3 +++ 1 file changed, 3 insertions(+) diff --git a/todo_completion b/todo_completion index 5e5a0e2..0d19e2a 100644 --- a/todo_completion +++ b/todo_completion @@ -1,3 +1,6 @@ +#!/bin/bash source-this-script +[ "$BASH_VERSION" ] || return + _todo() { local cur prev opts