Prompt to run $ command if present

This commit is contained in:
2021-11-22 23:12:51 +00:00
parent 709c65ce7b
commit 3978f2b1c2
2 changed files with 9 additions and 1 deletions

6
$ Executable file
View File

@@ -0,0 +1,6 @@
#!/usr/bin/env zsh
read -p "Are you sure? [y/N]: " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
exec "$@"
fi