From: Andreas Gerler Date: Mon, 6 Jun 2016 10:09:41 +0000 (+0200) Subject: snippet: tablesrcsh fix bug X-Git-Url: http://git.bundesbrandschatzamt.de/?a=commitdiff_plain;h=3c3d59d52b4947afcb72f5a9cf7c8ce661d6d29f;p=emacsconfig.git snippet: tablesrcsh fix bug - array index was incorrect. --- diff --git a/snippets/org-mode/tablesrcsh b/snippets/org-mode/tablesrcsh index 4ccb9505..118a65fa 100644 --- a/snippets/org-mode/tablesrcsh +++ b/snippets/org-mode/tablesrcsh @@ -10,7 +10,7 @@ ${2:#+NAME: ${3:`(replace-regexp-in-string "[: ]" "_" (replace-regexp-in-string #+BEGIN_SRC sh ${4::session ${5:client}} :var ${6:HOSTS$(upcase (yas-text))}=$1[,0] :cache ${7:$$(yas-choose-value '("yes" "no"))} :results ${8:$$(yas-choose-value '("verbatim drawer" "table" "list"))} $6=($$6) -for INDEX in \`seq 0 1 \$\{#$6[@]\}\`; do +for INDEX in \$\{!$6[@]\}; do echo "----------------------------------------" echo \$\{$6[$\{INDEX\}]\} echo "----------------------------------------"