diff --git a/fish/config.fish b/fish/config.fish index 2b1dcad..2161003 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -9,6 +9,8 @@ if status is-interactive alias lT="exa -Tlh --no-user --no-time" alias ll="exa -lh --no-user" alias la="exa -lha --git --no-user" + alias nv="foreground_nvim" + alias gr="gh repo clone" # Exported Variables set -gx PATH ~/.local/bin $PATH diff --git a/fish/functions/foreground_nvim.fish b/fish/functions/foreground_nvim.fish new file mode 100644 index 0000000..41be281 --- /dev/null +++ b/fish/functions/foreground_nvim.fish @@ -0,0 +1,8 @@ +function foreground_nvim + if jobs | grep -q "stopped.*nvim" + set pid (jobs | grep "stopped.*nvim" | head -n 1 | awk '{print $2}') + fg $pid + else + nvim $argv + end +end