From 9b64341b1fd3198344e1b8e13448924b9c65e3ef Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 8 Apr 2014 11:32:42 +1200 Subject: Require at least one argument to vis function --- bash/bashrc.d/vim.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bash/bashrc.d') diff --git a/bash/bashrc.d/vim.bash b/bash/bashrc.d/vim.bash index 03193c6e..c73ad841 100644 --- a/bash/bashrc.d/vim.bash +++ b/bash/bashrc.d/vim.bash @@ -15,7 +15,7 @@ vis() { # Distinguish options from file arguments endopts=0 - for arg in "$@" ; do + for arg in "${@:?}" ; do if [[ $arg == -- ]] ; then endopts=1 elif [[ $arg == -* ]] && ! ((endopts)) ; then -- cgit v1.2.3