From c120c9b9b85a7d8024208b8db84a5f3eb799b1e0 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Wed, 14 Dec 2016 09:13:27 +0000 Subject: [PATCH] url2nc bug --- etc/profile.d/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/profile.d/functions b/etc/profile.d/functions index 26b792d5..b42bb8e4 100644 --- a/etc/profile.d/functions +++ b/etc/profile.d/functions @@ -645,7 +645,7 @@ is_prompt() { url2nc() { local in="cat"; [ -n "$*" ] && in="echo $*"; - eval $in | perl -ne ' BEGIN{%p=("ssh"=>22,"https"=>443,"http"=>80);}; /([\w\._-]+):(\d+)/ and print "$1 $2\n" and next; m,^\w+://, or $_="ssh://$_"; m,^(\w+)://(?:[^@]+@)?([\w\._-]+), and print "$2 ".($p{$1}||22)."\n" and next' + eval $in | perl -ne ' BEGIN{%p=("ssh"=>22,"https"=>443,"http"=>80);}; /([\w\._-]+):(\d+)\b/ and print "$1 $2\n" and next; m,^\w+://, or $_="ssh://$_"; m,^(\w+)://(?:[^@]+@)?([\w\._-]+), and print "$2 ".($p{$1}||22)."\n" and next' } ls_users() { -- 2.47.3