dot

packages and services management
Log | Files | Refs | README

commit c6ed33b584abc7305b6972ca8aaa28558e6a3d7c
parent e8eefca54ff39e720bba270a62d6f36ed16fff6c
Author: Josuah Demangeon <mail@josuah.net>
Date:   Thu, 14 Dec 2017 22:40:43 +0100

simplify ssh rule

Diffstat:
Mbin/xdg-open | 13+++++--------
1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/bin/xdg-open b/bin/xdg-open @@ -116,17 +116,14 @@ case $scheme in (sftp) address=${1#*://} address=${address%*:} - if [ "$port" = . ] - then aexec sftp "$address" - else aexec sftp -p "$port" "$address" - fi + [ "$port" = . ] && port=22 + aexec sftp -p "$port" "$address" + ;; (ssh) address=${1#*://} address=${address%:*} - if [ "$port" = . ] - then aexec ssh "$address" - else aexec ssh -p "$port" "$address" - fi + [ "$port" = . ] && port=22 + aexec ssh -p "$port" "$address" ;; (telnet) address=${1#telnet://}