mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-12-16 02:14:17 +00:00
Last commit before tagging and releasing
This commit is contained in:
10
extras/imported/shell-script-mode/Idioms/Tempfile.yasnippet
Normal file
10
extras/imported/shell-script-mode/Idioms/Tempfile.yasnippet
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: temp
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Tempfile
|
||||
# --
|
||||
${1:TMPFILE}="$(mktemp -t ${2:`echo "${TM_FILENAME%.*}" | sed -e 's/[^a-zA-Z]/_/g' -e 's/^$/untitled/'`})"
|
||||
${3:${4/(.+)/trap "/}${4:rm -f '\$${1/.*\s//}'}${4/(.+)/" 0 # EXIT
|
||||
/}${5/(.+)/trap "/}${5:rm -f '\$${1/.*\s//}'; exit 1}${5/(.+)/" 2 # INT
|
||||
/}${6/(.+)/trap "/}${6:rm -f '\$${1/.*\s//}'; exit 1}${6/(.+)/" 1 15 # HUP TERM
|
||||
/}}
|
||||
Reference in New Issue
Block a user