diff options
Diffstat (limited to 'accounts/gkleen@sif/zshrc')
| -rw-r--r-- | accounts/gkleen@sif/zshrc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/accounts/gkleen@sif/zshrc b/accounts/gkleen@sif/zshrc index c628e2e9..362943f3 100644 --- a/accounts/gkleen@sif/zshrc +++ b/accounts/gkleen@sif/zshrc | |||
| @@ -300,6 +300,21 @@ dichotomic_search() { | |||
| 300 | echo $min | 300 | echo $min |
| 301 | } | 301 | } |
| 302 | 302 | ||
| 303 | sieve-edit() { | ||
| 304 | case "$host" in | ||
| 305 | surtr) | ||
| 306 | sieve-connect -s surtr.yggdrasil.li -m EXTERNAL --clientkey <(nix run nixos'#'sops -- decrypt ~flk/hosts/surtr/email/ca/gkleen@sif.key) --clientcert ~flk/hosts/surtr/email/ca/gkleen@sif.crt --edit --remotesieve sieve | ||
| 307 | ;; | ||
| 308 | ymir) | ||
| 309 | sieve-connect -s ymir.yggdrasil.li -u gkleen --edit --remotesieve sieve | ||
| 310 | ;; | ||
| 311 | *) | ||
| 312 | echo "Unknown host: ‘$host’" >&2 | ||
| 313 | exit 2 | ||
| 314 | ;; | ||
| 315 | esac | ||
| 316 | } | ||
| 317 | |||
| 303 | while read -r -d $'\0' d _ s; do | 318 | while read -r -d $'\0' d _ s; do |
| 304 | hash -d ${s}=${d} | 319 | hash -d ${s}=${d} |
| 305 | done < <(find ~/projects ~/uni -regextype posix-extended -maxdepth 2 -type d -regex '\S+/[0-9]{2}[ws]/\S+' -print0 2>/dev/null | \ | 320 | done < <(find ~/projects ~/uni -regextype posix-extended -maxdepth 2 -type d -regex '\S+/[0-9]{2}[ws]/\S+' -print0 2>/dev/null | \ |
