Prompt to run $ command if present

This commit is contained in:
Kenneth Benzie 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

View File

@ -36,7 +36,7 @@
cmd: ~/.config/zsh/fzf/install --bin
creates: ~/.config/zsh/fzf/bin/fzf
- name: zsh create symboic links
- name: zsh create symbolic links
file:
state: link
src: '{{item.src}}'
@ -68,6 +68,8 @@
dest: ~/.local/bin/fzf-tmux
- src: ~/.config/zsh/cmake-uninstall
dest: ~/.local/bin/cmake-uninstall
- src: ~/.config/zsh/$
dest: ~/.local/bin/$
- name: zsh get absolute path
shell: which zsh