From 07557734129cd53acb5eff9d59b0d6144925e3e7 Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Thu, 20 Jun 2013 15:51:30 +0200 Subject: afssh: factor out usage --- afssh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/afssh b/afssh index 12ad1d8..84b8545 100755 --- a/afssh +++ b/afssh @@ -22,6 +22,15 @@ set -e +usage () { + echo "usage: afssh [ssh-agent-filter options] -- [ssh options]" + echo + "$SAF" --help + echo + ssh --help + exit +} + declare -a agent_filter_args if [ -x "${BASH_SOURCE%/*}/ssh-agent-filter" ]; then @@ -32,12 +41,7 @@ fi while true; do if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then - echo "usage: afssh [ssh-agent-filter options] -- [ssh options]" - echo - "$SAF" --help - echo - ssh --help - exit + usage elif [ "$1" = "--" ]; then shift break -- cgit v1.2.3