aboutsummaryrefslogtreecommitdiff
path: root/scripts/.scripts/cpp_template.sh
diff options
context:
space:
mode:
authoromagdy7 <omar.professional8777@gmail.com>2022-07-03 17:19:09 +0200
committeromagdy7 <omar.professional8777@gmail.com>2022-07-03 17:19:09 +0200
commitb49990801e1533736ad19eef0429b7bf5cbfb812 (patch)
treeb6d03154cec8125ed3269b75dc2040a98c14954d /scripts/.scripts/cpp_template.sh
parent4390ba544556a96765c136c933f4375990b34895 (diff)
downloaddotfiles-b49990801e1533736ad19eef0429b7bf5cbfb812.tar.xz
dotfiles-b49990801e1533736ad19eef0429b7bf5cbfb812.zip
Updated some scripts
Diffstat (limited to 'scripts/.scripts/cpp_template.sh')
-rwxr-xr-xscripts/.scripts/cpp_template.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/.scripts/cpp_template.sh b/scripts/.scripts/cpp_template.sh
index 6165f51..f2ed036 100755
--- a/scripts/.scripts/cpp_template.sh
+++ b/scripts/.scripts/cpp_template.sh
@@ -1,8 +1,12 @@
#!/bin/sh
-touch $1.cpp
-echo -e "#include<bits/stdc++.h>\n\nusing namespace std;\n\nint main () {\n}" > $1.cpp
-nvim $1.cpp
+echo -e "Are you sure? y)es n)o"
+read input
+if [ "$input" = 'y' ]; then
+ touch $1.cpp
+ echo -e "#include<bits/stdc++.h>\n\nusing namespace std;\n\nint main () {\n}" > $1.cpp
+ nvim $1.cpp
+fi