]> git.nbdom.net Git - nb.git/commitdiff
profile
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 31 Jul 2015 14:43:07 +0000 (15:43 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 31 Jul 2015 14:43:07 +0000 (15:43 +0100)
etc/profile.d/functions

index 5ca4a17d327a803fd91792dd361de1589bef6078..04912a4c84ab34e8b2bb42a3b2ca49fc961fabdc 100644 (file)
@@ -42,6 +42,7 @@ shell_help_noarg() {
 
 shell_functions() {
   set | perl -ne '/^([a-z][\w_-]+) \(\)\s*$/ and print "$1\n"'
+  #set | perl -ne '/^([a-z][\w_-]+) \(\)\s*$/ and print "$1 "' | perl -pe 's/\s+$//'
 }
 
 shell_slogin() {
@@ -50,7 +51,7 @@ shell_slogin() {
   declare tmp; tmp="/tmp/$FUNCNAME.$USER"
   (
     alias
-    type $(shell_functions) | grep -v 'is a function$'
+    eval type $(shell_functions|perl -pe 's/\s+/ /') | grep -v 'is a function$'
     #cat $NB_ROOT/etc/profile
     echo "[ -r /etc/profile ] && . /etc/profile"
   ) | ssh "$server" "cat > $tmp || rm -vf $tmp" || return