From f4b3401f9eb0cb4ae2e6c41c01a0b9c3c73d9f7e Mon Sep 17 00:00:00 2001 From: Eric Paris Date: Mon, 4 May 2015 14:40:27 -0400 Subject: [PATCH] Clean up minor bash complaints from shellcheck.net --- bash_completions.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bash_completions.go b/bash_completions.go index 485a9a3..592a5d5 100644 --- a/bash_completions.go +++ b/bash_completions.go @@ -22,7 +22,7 @@ func preamble(out *bytes.Buffer) { __debug() { if [[ -n ${BASH_COMP_DEBUG_FILE} ]]; then - echo "$*" >> ${BASH_COMP_DEBUG_FILE} + echo "$*" >> "${BASH_COMP_DEBUG_FILE}" fi } @@ -173,10 +173,9 @@ __handle_word() func postscript(out *bytes.Buffer, name string) { fmt.Fprintf(out, "__start_%s()\n", name) fmt.Fprintf(out, `{ - local cur prev words cword split + local cur prev words cword _init_completion -s || return - local completions_func local c=0 local flags=() local two_word_flags=()