blob: 39a83f8898655ac4a6be2aff75882e61af2cdcbe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
|