add a check to execute command beginning by $
This commit is contained in:
parent
a684117ab6
commit
749b08929b
6
snippy
6
snippy
@ -6,6 +6,8 @@
|
|||||||
# . {clipboard} placeholder to use current clipboard in snippet
|
# . {clipboard} placeholder to use current clipboard in snippet
|
||||||
# . {cursor} placeholder to place the cursor
|
# . {cursor} placeholder to place the cursor
|
||||||
# . ##noparse header in snippet to not parse
|
# . ##noparse header in snippet to not parse
|
||||||
|
# . execute command begining by $
|
||||||
|
#
|
||||||
# augmented by "opennomad": https://gist.github.com/opennomad/15c4d624dce99066a82d
|
# augmented by "opennomad": https://gist.github.com/opennomad/15c4d624dce99066a82d
|
||||||
# originally written by "mhwombat": https://bbs.archlinux.org/viewtopic.php?id=71938&p=2
|
# originally written by "mhwombat": https://bbs.archlinux.org/viewtopic.php?id=71938&p=2
|
||||||
# Based on "snippy" by "sessy"
|
# Based on "snippy" by "sessy"
|
||||||
@ -88,8 +90,8 @@ run(){
|
|||||||
content="$(bashdown < "${DIR}/${FILE}")"
|
content="$(bashdown < "${DIR}/${FILE}")"
|
||||||
fi
|
fi
|
||||||
printf "%s" "$content" > $TMPFILE
|
printf "%s" "$content" > $TMPFILE
|
||||||
else
|
else [[ ${FILE} =~ ^$ ]]
|
||||||
${FILE} &> $TMPFILE # execute as bashcommand
|
${FILE##*$} 2>/dev/null > $TMPFILE # execute as bashcommand
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local current_clip cursor
|
local current_clip cursor
|
||||||
|
Loading…
Reference in New Issue
Block a user