diff --git a/users/tao/nushell/env.nu b/users/tao/nushell/env.nu index 9171d7e..9997a87 100644 --- a/users/tao/nushell/env.nu +++ b/users/tao/nushell/env.nu @@ -85,4 +85,4 @@ $env.GOPATH = '/home/tao/.go' # $env.CARAPACE_BRIDGES mkdir ~/.cache/carapace -carapace _carapace nushell | save -f ~/.cache/carapace/init.nu +# carapace _carapace nushell | save -f ~/.cache/carapace/init.nu diff --git a/users/tao/nushell/extras/alias.nu b/users/tao/nushell/extras/alias.nu index 0f0167f..178b62a 100644 --- a/users/tao/nushell/extras/alias.nu +++ b/users/tao/nushell/extras/alias.nu @@ -32,6 +32,10 @@ alias js = jj status alias jw = jj workspace update-stale def jm [-r: string = "@"] { + mut r = $r + if (jj log -r @ --no-pager --no-graph --template 'if(empty,"empty")' | $in == "empty") { + $r = "@-" + } jj bookmark set main -r $r jj git push } diff --git a/users/tao/nushell/extras/tailscale.nu b/users/tao/nushell/extras/tailscale.nu index 73810b0..0630ba4 100644 --- a/users/tao/nushell/extras/tailscale.nu +++ b/users/tao/nushell/extras/tailscale.nu @@ -28,9 +28,11 @@ def tse [exit_node: string = ""] { # list all mullvad exit nodes def tsx [] { tailscale exit-node list - | detect columns --guess - | drop 3 + | lines + | drop 4 | skip 1 + | to text + | detect columns --guess | where HOSTNAME =~ mullvad | reject STATUS }