Initial commit.
This commit is contained in:
5
vim/snippets/sh/yesno/longer.snippet
Executable file
5
vim/snippets/sh/yesno/longer.snippet
Executable file
@@ -0,0 +1,5 @@
|
||||
echo -n "Do you wish to ${1:#question}" '[y/n] ' ; read ${2:ans}
|
||||
case "$$2" in
|
||||
y*|Y*) ${3:#statement} ;;
|
||||
*) ${4:#statement};;
|
||||
esac
|
||||
6
vim/snippets/sh/yesno/simple.snippet
Executable file
6
vim/snippets/sh/yesno/simple.snippet
Executable file
@@ -0,0 +1,6 @@
|
||||
read ${1:yn}
|
||||
if [[ $$1 =~ [Yy] ]]; then
|
||||
echo "${2:#statement}"
|
||||
else
|
||||
echo "${3:#statement}"
|
||||
fi
|
||||
Reference in New Issue
Block a user