summaryrefslogtreecommitdiff
path: root/afssh
diff options
context:
space:
mode:
Diffstat (limited to 'afssh')
-rwxr-xr-xafssh9
1 files changed, 6 insertions, 3 deletions
diff --git a/afssh b/afssh
index 2a4d570..3b9d84f 100755
--- a/afssh
+++ b/afssh
@@ -86,8 +86,11 @@ unset SSH_AGENT_PID
trap 'kill "$SSH_AGENT_PID"; rm -r "$TEMPDIR"' EXIT
TEMPDIR=$(mktemp -d)
-eval $(cd "$TEMPDIR"; "$SAF" "${agent_filter_args[@]}" || echo exit $?)
-
-ssh-add -l
+if [ -t 1 ]; then
+ eval $(cd "$TEMPDIR"; "$SAF" "${agent_filter_args[@]}" || echo exit $?)
+ ssh-add -l
+else
+ eval $(cd "$TEMPDIR"; "$SAF" "${agent_filter_args[@]}" || echo exit $?) > /dev/null
+fi
ssh -A "$@"