I have a shell script which uses an array to check dependencies. I'd like to make this into a YASnippet, but YAS recognizes the array value statement ${dependencies[@]}
as a placeholder. How can I tell YAS to ignore this placeholder?
# key: write.bash
# name: write.bash
# --
#!/bin/bash
dependencies=("${1:dependency 1}" "${2:dependency 2}")
for i in ${dependencies[@]}; do
if [ "$(which $i)" = "" ] ; then
echo "EARLY EXIT- $i needs to be installed and on PATH"
exit 0
else
echo "$i installed"
fi;
done
$${3:{dependencies[@]}}
but I would like to avoid the placeholder altogether – jeszyman Mar 6 '19 at 18:10