aboutsummaryrefslogtreecommitdiff
path: root/dot_zshenv
blob: 38d3e4b5bf472dacb3e8f10247a5b9987e4ce77c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# for gpg-agent/pinentry to work, even in non-interactive shells
export GPG_TTY="${TTY}"

# Otherwise we cannot use ^o as a keybinding
case `uname` in
    Darwin|OpenBSD)
        stty discard undef
        ;;
esac

aklogs () {
    for r in ANDREW.CMU.EDU CLUB.CC.CMU.EDU; do
        KRB5CCNAME=`KRB5CCNAME=DIR:$HOME/.cache/krb5cc klist -l | grep $r | sed -e s'/.*:://g'` aklog -c $r -k $r
    done
}

kinits () {
    kinit -r 200h -f rkavanag@ANDREW.CMU.EDU
    kinit -r 200h -f rak@CLUB.CC.CMU.EDU
}

rkinits () {
    for r in rkavanag@ANDREW.CMU.EDU rak@CLUB.CC.CMU.EDU; do
        KRB5CCNAME=`KRB5CCNAME=DIR:$HOME/.cache/krb5cc klist -l | grep $r | sed -e s'/.*:://g'` kinit -R $r
    done
    KRB5CCNAME=DIR:$HOME/.cache/krb5cc aklogs
}