]> git.madduck.net Git - etc/zsh.git/blob - .zsh/zshrc/99-getpw-override

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

move Git prompt handling to theme
[etc/zsh.git] / .zsh / zshrc / 99-getpw-override
1 unalias getpw 2>/dev/null
2 getpw() {
3   if ! pass -c "$@"; then
4     if old-getpw "$@"; then
5       echo >&2 "Please migrate the password for $@"
6       genpw "$@"
7       echo >&2 "Old password is now in X paste buffer, new one in clipboard"
8     fi
9   fi
10 }
11 autoload -zU compdef
12 compdef _pass getpw