progrium/plugn — pull request #2 by lalyos (2014-11-05 13:06:17+00:00)
Title: Fix missing newlines

The concatenated bashenv file gets syntax error

## Reproduce the error

```
$ docker run -ti --rm golang bash -c 'go get github.com/progrium/plugn; plugn'

/tmp/bashenv.259506031: line 226: syntax error: unexpected end of file
bash: main: command not found
```

## Missing newline

Here is the generated /tmp/bashenv.259506031 , which show how main() and toml-get() slips together
```
main() {
set -eo pipefail; [[ "$TRACE" ]] && set -x
export BASH_ENV=
if [[ ! "$PLUGIN_PATH" ]]; then
echo "!! PLUGIN_PATH is not set in environment"
exit 2
fi

cmd-export install
cmd-export uninstall
cmd-export list
cmd-export trigger
cmd-export enable
cmd-export disable
cmd-export-ns config "Plugin configuration"
cmd-export config-get
cmd-export config-export
cmd-export config-set
cmd-export init

cmd-ns "" "$@"
}toml-get() { $PROGRAM :: toml-get "$@"; }
toml-set() { $PROGRAM :: toml-set "$@"; }
toml-export() { $PROGRAM :: toml-export "$@"; }
```