From e984ddfcf76f4dbff078787bcecb67d9c295b3fc Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Sun, 5 May 2024 08:56:36 -0500 Subject: [PATCH] fish: get-local-ip function --- home/features/cli/fish.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/home/features/cli/fish.nix b/home/features/cli/fish.nix index a7aef19..9522560 100644 --- a/home/features/cli/fish.nix +++ b/home/features/cli/fish.nix @@ -67,6 +67,8 @@ echo -n -s (prompt_login)' ' (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) $normal " "$nix_shell_info $prompt_status $suffix " " ''; + get-local-ip = "ip addr show $(ip route | grep default | awk '{print $5}') | grep 'inet ' | awk '{print $2}' | cut -d/ -f1"; + ssh = "TERM=xterm command ssh $argv"; # Rebuild home-manager switch-home = "home-manager switch -b backup --flake ${config.home.homeDirectory}/.dotfiles#$USER@$(hostname -s)";