diff options
Diffstat (limited to 'bin/execprim')
| -rwxr-xr-x | bin/execprim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/execprim b/bin/execprim new file mode 100755 index 0000000..39a83f8 --- /dev/null +++ b/bin/execprim @@ -0,0 +1,15 @@ +#!/bin/sh + +# Print primary selection with all special chars to stdout and +# prompt if this should be evaluated + +# Author: Florian Fischer +# License: WTFPL + +! type xclip &>/dev/null && echo "Please install xclip" && exit 1 + +PRIMARY=$(xclip -o) +echo $PRIMARY | cat -A # show special chars +echo -e "\nExecute? (y/N): " +read CHOICE +[[ "$CHOICE" -eq "y" ]] && eval $PRIMARY |
