diff --git a/config/fish/conf.d/alias.fish b/config/fish/conf.d/aliases.fish similarity index 100% rename from config/fish/conf.d/alias.fish rename to config/fish/conf.d/aliases.fish diff --git a/config/fish/functions/pkill.fish b/config/fish/functions/pkill.fish new file mode 100644 index 0000000..b860642 --- /dev/null +++ b/config/fish/functions/pkill.fish @@ -0,0 +1,7 @@ +function pkill -d "Wrapper around pkill to use fuzzy finder when no argument given" + if test (count $argv) -eq 0 + ps ax -o user=,pid=,%cpu=,%mem=,stat=,time=,command= | fzf | awk '{print $2}' | xargs kill + else + command pkill $argv + end +end diff --git a/config/fish/functions/sortw.fish b/config/fish/functions/sortw.fish new file mode 100644 index 0000000..df1125c --- /dev/null +++ b/config/fish/functions/sortw.fish @@ -0,0 +1,8 @@ +function sortw -d "Wrapper around sort to save file after sorting" + if test (count $argv) -eq 0 + echo "No file provided" + return 1 + else + command sort $argv[1] -o $argv[1] + end +end diff --git a/config/fish/functions/srtdock.fish b/config/fish/functions/srtdock.fish index 05098a4..7f6c4ce 100644 --- a/config/fish/functions/srtdock.fish +++ b/config/fish/functions/srtdock.fish @@ -1,3 +1,3 @@ -function srtdock +function srtdock -d "Start docker daemon" sudo systemctl start docker end