From a87d147b29879e92c1014f7568a5c60f4207f859 Mon Sep 17 00:00:00 2001 From: Jeffrey Serio <23226432+hyperreal64@users.noreply.github.com> Date: Fri, 12 Apr 2024 20:35:15 -0500 Subject: [PATCH] Update --- config.nu | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/config.nu b/config.nu index d2af433..abde541 100644 --- a/config.nu +++ b/config.nu @@ -1,6 +1,4 @@ # Nushell Config File -# -# version = "0.90.1" # Command existence checker function def 'is-installed' [ app: string ] { @@ -41,6 +39,15 @@ source $DISTRO_CONFIG # ALIASES / CUSTOM COMMANDS # +# Copy nushell config to git repo +def cpnurepo [] { + let repo = ($nu.home-path | path join "repos/codeberg.org/hyperreal/nushell-config") + cp -v $nu.config-path $repo + cp -v $nu.env-path $repo + cp -rfv $MODDIR $repo + echo "Nushell config copied to local repo" +} + # Custom commands for Doom Emacs def doomdoc [] { ~/.config/emacs/bin/doom doctor } def dsync [] { ~/.config/emacs/bin/doom sync } @@ -162,7 +169,7 @@ def tstampz [] { date now | format date "%FT%T%:z" } def --env mkd [path] { mkdir $path; cd $path } # Display pid info of command -def pids [cmd] { ps | where name == "$cmd" } +def pids [cmd] { ps | where name == $cmd } # Get time in specific time zone def whattimein [string] { @@ -197,7 +204,7 @@ def caseify [case: string, filename: path] { # Select a host to SSH into def nussh [] { - let ssh_host = (ssh ssh-list | get Host | input list $"(ansi yellow)Which host to SSH into?(ansi reset)") + let ssh_host = (ssh ssh-list | get Host | input list $"\n(ansi red)Which host to SSH into?(ansi reset)") if ($ssh_host | describe) != "string" { echo "Operation cancelled" return