]> snippets.scripts.mit.edu Git - Scripts/git/.git/blobdiff - kerberos/kdo
kdo: Add an emacs modeline, and make emacs happier with quoting.
[Scripts/git/.git] / kerberos / kdo
index 51a5d9b5682020b261565660e21637c81e002710..059612ebe75334a8f00779e8a18bb104a7e0ab17 100644 (file)
@@ -1,6 +1,9 @@
+# -*- mode: sh -*-
 # kdo is a shell function for interacting with multiple Kerberos
 # credential caches.
 #
+# To use kdo, add this snippet to your .bashrc or .bashrc.mine file.
+#
 # To run a command with a different set of credentials from your
 # default, run
 #
@@ -46,6 +49,7 @@ if [ "Darwin" = "$(uname)" ]; then
     knewcache () {
         princ="$1"; shift
         local oldcache="$(klist | grep 'Kerberos 5 ticket cache' | cut -f 2 -d "'")"
+        # " # <-- emacs thinks there's an unbalanced " on the previous line.
         kinit "$@" "$princ" || return 1
         cache="$(kfindcache "$princ")"
         # On OS X, kinit will switch your default credential cache to