]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
snippet: tablesrcsh fix bug
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Mon, 6 Jun 2016 10:09:41 +0000 (12:09 +0200)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Mon, 6 Jun 2016 10:09:41 +0000 (12:09 +0200)
- array index was incorrect.

snippets/org-mode/tablesrcsh

index 4ccb95053a6a8da05d86b2645d5825eb90c9d115..118a65fa159b3baad087de0ac97b10b993bec1ee 100644 (file)
@@ -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 "----------------------------------------"