From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23249 invoked by alias); 2 Oct 2015 22:05:03 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36754 Received: (qmail 26116 invoked from network); 2 Oct 2015 22:05:02 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=dQWgtreSLfXPdH+meAZ3z7YAGhPUaLsBCd5s53D+XiM=; b=AzksrXLAkcHVhkHXTakvbeHkW/g+frH1u53onH85iw/swzEBCMvjbJ8d1kLBy6NFHP WOKbqPkayVk+oWXrFd6ykFVmUe1vrTuy9GAapTLgcDPUPBF4kAV9LZmceSQ38HGnyULi vaZlgeL03KM3gCj49kBOvHyQCZg9pTeX3G1NyuSShwmMzmDDUM4I6NVcccA1pF5FN3sQ XUCb9dJOexIQXq3lRvsTCzPnt5LBLYvthwmolJgTziTde81rsJsvllrsXf8K0zJixhMm Eb+/mQDH/p7O0JFawfOFABlRpAST8t4sV+NM3zt7aXymS81phzcVdVdm7nmQ25caL67x GtPw== X-Received: by 10.180.198.180 with SMTP id jd20mr1052938wic.70.1443823500381; Fri, 02 Oct 2015 15:05:00 -0700 (PDT) From: Mikael Magnusson To: zsh-workers@zsh.org Subject: PATCH: Tweak some usage output in the tcp_* functions Date: Sat, 3 Oct 2015 00:04:54 +0200 Message-Id: <1443823494-20164-1-git-send-email-mikachu@gmail.com> X-Mailer: git-send-email 2.5.0 --- Functions/TCP/tcp_open | 2 +- Functions/TCP/tcp_read | 2 +- Functions/TCP/tcp_send | 2 +- Functions/TCP/tcp_shoot | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Functions/TCP/tcp_open b/Functions/TCP/tcp_open index 0912177..a04403c 100644 --- a/Functions/TCP/tcp_open +++ b/Functions/TCP/tcp_open @@ -152,7 +152,7 @@ fi if (( $# )); then print "Usage: $0 [-z] [-a fd | -f fd | host port [ session ] ] - $0 [-z] [ -s session | -l sesslist ] ..." >&2 + $0 [-z] [ -s session | -l sesslist ] ..." >&2 return 1 fi diff --git a/Functions/TCP/tcp_read b/Functions/TCP/tcp_read index f880395..ba9185e 100644 --- a/Functions/TCP/tcp_read +++ b/Functions/TCP/tcp_read @@ -116,7 +116,7 @@ while getopts "abdl:qs:t:T:u:" opt; do read_fds[$((read_fd))]=1 done ;; - (*) [[ $opt != \? ]] && print Unhandled option, complain: $opt >&2 + (*) [[ $opt != \? ]] && print "Unhandled option, complain: $opt" >&2 return 1 ;; esac diff --git a/Functions/TCP/tcp_send b/Functions/TCP/tcp_send index c976a2f..86dda64 100644 --- a/Functions/TCP/tcp_send +++ b/Functions/TCP/tcp_send @@ -29,7 +29,7 @@ while getopts "acl:nqs:" opt; do fi sessions+=($OPTARG) ;; - (*) [[ $opt != '?' ]] && print Unhandled option, complain: $opt >&2 + (*) [[ $opt != '?' ]] && print "Unhandled option, complain: $opt" >&2 return 1 ;; esac diff --git a/Functions/TCP/tcp_shoot b/Functions/TCP/tcp_shoot index 8ff9866..c485c14 100644 --- a/Functions/TCP/tcp_shoot +++ b/Functions/TCP/tcp_shoot @@ -4,8 +4,8 @@ setopt extendedglob local REPLY tfd if [[ $# -ne 2 ]]; then - print "Usage: tcp_dump host port -Connect to the given host and port; send standard input.">&2 + print "Usage: $0 host port +Connect to the given host and port; send standard input." >&2 return 1 fi -- 2.5.0