summaryrefslogtreecommitdiff
path: root/software
diff options
context:
space:
mode:
Diffstat (limited to 'software')
-rw-r--r--software/scripts/encrypt-if-possible.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/software/scripts/encrypt-if-possible.sh b/software/scripts/encrypt-if-possible.sh
index 36e15cb..f067752 100644
--- a/software/scripts/encrypt-if-possible.sh
+++ b/software/scripts/encrypt-if-possible.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright 2009 Nick White
+# Copyright 2009,2010 Nick White
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,7 +20,8 @@
# To use this in mutt, add the following to your ~/.muttrc:
# source encrypt-if-possible.sh|
-gpg --list-keys | sed \
- -e '/@/!d' \
- -e 's/\(.*\)<\(.*\)>/\2/g' \
- -e 's/\(.*\)/send-hook \1 "set crypt_autoencrypt = yes"/g'
+gpg --list-keys | sed '
+/@/!d
+s/^.*<//g
+s/>$//g
+s/.*/send-hook & "set crypt_autoencrypt = yes"/g'