From 769a39b3a085386e276d855a98460ffe31cc2745 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Fri, 14 Sep 2018 03:31:13 -0400 Subject: [PATCH] fix cat and lg functions --- .gitmodules | 4 +--- fish/.config/fish/functions/cat.fish | 7 +++++++ fish/.config/fish/functions/lg.fish | 6 +++++- 3 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 fish/.config/fish/functions/cat.fish diff --git a/.gitmodules b/.gitmodules index 0725e7a..0495623 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,4 @@ [submodule "fish/.config/fish/nvm-wrapper"] path = fish/.config/fish/nvm-wrapper url = https://github.com/passcod/nvm-fish-wrapper -[submodule "vim/.spf13-vim"] - path = vim/.spf13-vim - url = https://github.com/spf13/spf13-vim + diff --git a/fish/.config/fish/functions/cat.fish b/fish/.config/fish/functions/cat.fish new file mode 100644 index 0000000..47f06e3 --- /dev/null +++ b/fish/.config/fish/functions/cat.fish @@ -0,0 +1,7 @@ +function cat + if type -q bat >/dev/null +bat $argv +else +command cat $argv +end +end diff --git a/fish/.config/fish/functions/lg.fish b/fish/.config/fish/functions/lg.fish index 2aabb9d..4b7665e 100644 --- a/fish/.config/fish/functions/lg.fish +++ b/fish/.config/fish/functions/lg.fish @@ -1,4 +1,8 @@ function lg - lazygit $argv + if type -q lazygit > /dev/null + lazygit $argv + else + git status + end end