blob: 6cd91615924192621cdd16e5684e4c0466d8fc8c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
function pp --description 'safely execute content from the clipboard'
# fish version of https://github.com/Aaronmsv/PastejackingProtection
if not type -q xclip
echo please install xclip
return
end
set script (xclip -o)
echo "$script" | cat -A
echo -e "\nExecute? (y/N): "
read execute
if test "$execute" = "y"
eval $script
end
end
|