X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/4f92618fd8fb2e91a63e4aeef6477c98ba64ec5a..8b748cb5934673dec80786e6b4cc25d8a440a654:/vim/ultisnips/sh.snippets diff --git a/vim/ultisnips/sh.snippets b/vim/ultisnips/sh.snippets index 45d5f81..13c1419 100644 --- a/vim/ultisnips/sh.snippets +++ b/vim/ultisnips/sh.snippets @@ -8,6 +8,11 @@ snippet !env "#!/usr/bin/env (!env)" b endsnippet +snippet script_dir "Get dir of current script" b +${1:script_dir}="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +$0 +endsnippet + snippet ar "${array[@]}" w \${${1:array}[${2:@}]}$0 endsnippet