From ee260bfd5bc13dde207f3483aa3fc57bc77eb2db Mon Sep 17 00:00:00 2001 From: Tao Tien <29749622+taotien@users.noreply.github.com> Date: Mon, 29 Apr 2024 13:43:23 -0700 Subject: [PATCH] nushell funcs --- users/tao/nushell/stuff.nu | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/users/tao/nushell/stuff.nu b/users/tao/nushell/stuff.nu index 0ed974e..99a0767 100644 --- a/users/tao/nushell/stuff.nu +++ b/users/tao/nushell/stuff.nu @@ -13,17 +13,19 @@ def l [ path? flags? ] { - if $path == null { - # ls $flags - ls - } else { - # ls $flags $path + if $path { ls $path + } else { + ls } | sort-by type name -i } -def tse [exit_node] { - tailscale set --exit-node=$exit_node +def tse [exit_node?] { + if exit_node { + tailscale set --exit-node $exit_node + } else { + tailscale set --exit-node="" + } } def rb [] {