dotfiles

My dotfiles, nothing really interesting to see ...
git clone https://git.onna.be/dotfiles.git
Log | Files | Refs | README

commit b9106be93920fc7f90cd7bf0051ba7fbfc4ff324
parent 9f3d7b3bbc020355681a59dedb0a0dd32bcd3fde
Author: Paco Esteban <paco@onna.be>
Date:   Sat, 30 Jun 2018 18:11:20 +0200

some sanity for bash (hopefully) and cleanup snippet

Diffstat:
nvim/.config/nvim/UltiSnips/sh.snippets | 7+++++++
nvim/.config/nvim/templates/template.sh | 6+++++-
2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/nvim/.config/nvim/UltiSnips/sh.snippets b/nvim/.config/nvim/UltiSnips/sh.snippets @@ -67,4 +67,11 @@ while ${2:[[ ${1:condition} ]]}; do done endsnippet +snippet cleanup "bash exit trap" +function cleanup { + ${0:#cleanup logic ...} +} +trap cleanup EXIT +endsnippet + # vim:ft=snippets: diff --git a/nvim/.config/nvim/templates/template.sh b/nvim/.config/nvim/templates/template.sh @@ -1,2 +1,6 @@ #!/usr/bin/env bash - +# +# unofficial strict mode +# remove 'u' for bash < 4.4 !! +set -euo pipefail +shopt -s nullglob globstar