From 07c2973f0217f49ab6e19f6df7cd6607809f5fc7 Mon Sep 17 00:00:00 2001 From: Tao Tien <29749622+taotien@users.noreply.github.com> Date: Sun, 9 Mar 2025 01:33:34 -0800 Subject: [PATCH] we fix --- users/tao/nushell/extras/tailscale.nu | 7 ++++--- users/vy/nushell/extras/tailscale.nu | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/users/tao/nushell/extras/tailscale.nu b/users/tao/nushell/extras/tailscale.nu index 5dcee82..b421777 100644 --- a/users/tao/nushell/extras/tailscale.nu +++ b/users/tao/nushell/extras/tailscale.nu @@ -9,7 +9,7 @@ def check-mullvad [] { $check = $j.mullvad_exit_ip } print "" - print $"connected to ($j.city), ($j.country)" + return $"connected to ($j.city), ($j.country)" } # switch to a specific exit node, or none @@ -20,9 +20,10 @@ def tse [exit_node: string = ""] { tailscale set --exit-node $exit_node } if ($exit_node | is-not-empty) { - check-mullvad + check-mullvad | return $in + } else { + return "exit node set" } - return "exit node set" } # list all mullvad exit nodes diff --git a/users/vy/nushell/extras/tailscale.nu b/users/vy/nushell/extras/tailscale.nu index 5dcee82..b421777 100644 --- a/users/vy/nushell/extras/tailscale.nu +++ b/users/vy/nushell/extras/tailscale.nu @@ -9,7 +9,7 @@ def check-mullvad [] { $check = $j.mullvad_exit_ip } print "" - print $"connected to ($j.city), ($j.country)" + return $"connected to ($j.city), ($j.country)" } # switch to a specific exit node, or none @@ -20,9 +20,10 @@ def tse [exit_node: string = ""] { tailscale set --exit-node $exit_node } if ($exit_node | is-not-empty) { - check-mullvad + check-mullvad | return $in + } else { + return "exit node set" } - return "exit node set" } # list all mullvad exit nodes