Closed
Description
The macvim-askpass script isn't playing nicely on my system. The password prompt is being opened in Finder, instead of MacVim, and isn't brought to the front when it happens. The end result is I see a window open underneath my semi-transparent MacVim, don't even know what App it's a part of, and when I use expose, I can't even see the window, so it's very confusing 🙂
It appears that the program is a script copied from the Internet, and after fiddling with it, I think we can do better. I've replaced my version with this, which causes the dialog to open in MacVim directly, which is a much better user experience. We also don't need to reactivate MacVim once it's closed.
#! /bin/sh
#
# An SSH_ASKPASS command for MacOS X
#
# Author: Joseph Mocker, Sun Microsystems
#
# http://blog.retep.org/2009/04/09/ssh-askpass-on-osx-10-5/
#
# To use this script:
# setenv SSH_ASKPASS "macos-askpass"
# setenv DISPLAY ":0"
#
TITLE=${MACOS_ASKPASS_TITLE:-"SSH"}
DIALOG="display dialog \"$@\" default answer \"\" with title \"$TITLE\""
DIALOG="$DIALOG with icon caution with hidden answer"
result=`osascript -e 'tell application "MacVim"' -e "activate" -e "$DIALOG" -e "text returned of result" -e 'end tell'`
if [ "$result" = "" ]; then
exit 1
else
echo "$result"
exit 0
fi
Metadata
Metadata
Assignees
Labels
No labels