diff --git a/modules/network/sockets/sockets.nu b/modules/network/sockets/sockets.nu index f83fadb02..a72b7b4f2 100644 --- a/modules/network/sockets/sockets.nu +++ b/modules/network/sockets/sockets.nu @@ -1,4 +1,4 @@ -export def sockets [--abbreviate-java-class-paths (-j)] { +export def main [--abbreviate-java-class-paths (-j)] { let input = (^lsof +c 0xFFFF -i -n -P) let header = ($input | lines | take 1 @@ -12,7 +12,7 @@ export def sockets [--abbreviate-java-class-paths (-j)] { | upsert 'pid' { |r| $r.pid | into int } | rename --column { name: connection } | reject 'command' - | join-table (ps -l) 'pid' 'pid' + | join (ps -l) 'pid' 'pid' | if $abbreviate_java_class_paths { upsert 'classpath' { |r| $r.command | java-cmd classpath } | upsert 'command' { |r| $r.command | java-cmd abbreviate-classpath } @@ -26,7 +26,3 @@ export def 'java-cmd classpath' [] { export def 'java-cmd abbreviate-classpath' [] { str replace '[^ ]*\.jar' '*.jar' } - -export def join-table [table: table, left_on: string, right_on: string] { - dfr into df | join ($table | dfr into df) $left_on $right_on | dfr into nu -}