From 4a005f814362f721c9d2591c4926180e7a1754b5 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Thu, 23 Feb 2023 20:51:23 +0100 Subject: [PATCH] functions --- files/fish/.gitignore | 15 ++++++++++++++- files/fish/functions/brewer.fish | 3 +++ files/fish/functions/dc.fish | 4 ++++ files/fish/functions/dsp.fish | 3 +++ files/fish/functions/e.fish | 3 +++ files/fish/functions/k.fish | 3 +++ files/fish/functions/l.fish | 4 ++++ files/fish/functions/n.fish | 4 ++++ files/fish/functions/p.fish | 4 ++++ files/fish/functions/pe.fish | 3 +++ files/fish/functions/px.fish | 3 +++ files/fish/functions/rsync.fish | 3 +++ 12 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 files/fish/functions/brewer.fish create mode 100644 files/fish/functions/dc.fish create mode 100644 files/fish/functions/dsp.fish create mode 100644 files/fish/functions/e.fish create mode 100644 files/fish/functions/k.fish create mode 100644 files/fish/functions/l.fish create mode 100644 files/fish/functions/n.fish create mode 100644 files/fish/functions/p.fish create mode 100644 files/fish/functions/pe.fish create mode 100644 files/fish/functions/px.fish create mode 100644 files/fish/functions/rsync.fish diff --git a/files/fish/.gitignore b/files/fish/.gitignore index 6b5eca6..2442100 100644 --- a/files/fish/.gitignore +++ b/files/fish/.gitignore @@ -1,5 +1,18 @@ completions conf.d -functions themes fish_variables + + +functions/* +!functions/brewer.fish +!functions/dc.fish +!functions/dsp.fish +!functions/e.fish +!functions/k.fish +!functions/l.fish +!functions/n.fish +!functions/p.fish +!functions/pe.fish +!functions/px.fish +!functions/rsync.fish diff --git a/files/fish/functions/brewer.fish b/files/fish/functions/brewer.fish new file mode 100644 index 0000000..f36814c --- /dev/null +++ b/files/fish/functions/brewer.fish @@ -0,0 +1,3 @@ +function brewer --wraps='brew update && brew upgrade && brew cleanup' --description 'alias brewer brew update && brew upgrade && brew cleanup' + brew update && brew upgrade && brew cleanup $argv; +end diff --git a/files/fish/functions/dc.fish b/files/fish/functions/dc.fish new file mode 100644 index 0000000..05ca294 --- /dev/null +++ b/files/fish/functions/dc.fish @@ -0,0 +1,4 @@ +# Defined in - @ line 1 +function dc --wraps=docker-compose --description 'alias dc=docker-compose' + docker compose $argv; +end diff --git a/files/fish/functions/dsp.fish b/files/fish/functions/dsp.fish new file mode 100644 index 0000000..6c0ba45 --- /dev/null +++ b/files/fish/functions/dsp.fish @@ -0,0 +1,3 @@ +function dsp --wraps='docker system prune -a --volumes' --description 'alias dsp docker system prune -a --volumes' + docker system prune -a --volumes $argv; +end diff --git a/files/fish/functions/e.fish b/files/fish/functions/e.fish new file mode 100644 index 0000000..c415611 --- /dev/null +++ b/files/fish/functions/e.fish @@ -0,0 +1,3 @@ +function e --wraps=nvim --description 'alias e nvim' + nvim $argv; +end diff --git a/files/fish/functions/k.fish b/files/fish/functions/k.fish new file mode 100644 index 0000000..845f233 --- /dev/null +++ b/files/fish/functions/k.fish @@ -0,0 +1,3 @@ +function k --wraps=kubectl --description 'alias k kubectl' + kubectl $argv; +end diff --git a/files/fish/functions/l.fish b/files/fish/functions/l.fish new file mode 100644 index 0000000..172702c --- /dev/null +++ b/files/fish/functions/l.fish @@ -0,0 +1,4 @@ +# Defined in - @ line 1 +function l --wraps=la --description 'alias l la' + la $argv; +end diff --git a/files/fish/functions/n.fish b/files/fish/functions/n.fish new file mode 100644 index 0000000..2606956 --- /dev/null +++ b/files/fish/functions/n.fish @@ -0,0 +1,4 @@ +function n + nvm install $argv; + nvm use $argv; +end diff --git a/files/fish/functions/p.fish b/files/fish/functions/p.fish new file mode 100644 index 0000000..679d332 --- /dev/null +++ b/files/fish/functions/p.fish @@ -0,0 +1,4 @@ +# Defined via `source` +function p --wraps=pnpm --description 'alias p pnpm' + pnpm $argv; +end diff --git a/files/fish/functions/pe.fish b/files/fish/functions/pe.fish new file mode 100644 index 0000000..bc4409e --- /dev/null +++ b/files/fish/functions/pe.fish @@ -0,0 +1,3 @@ +function pe --wraps='pnpm exec' --description 'alias pe pnpm exec' + pnpm exec $argv; +end diff --git a/files/fish/functions/px.fish b/files/fish/functions/px.fish new file mode 100644 index 0000000..604d146 --- /dev/null +++ b/files/fish/functions/px.fish @@ -0,0 +1,3 @@ +function px --wraps=pnpx --description 'alias px pnpx' + pnpm -s dlx $argv; +end diff --git a/files/fish/functions/rsync.fish b/files/fish/functions/rsync.fish new file mode 100644 index 0000000..70607db --- /dev/null +++ b/files/fish/functions/rsync.fish @@ -0,0 +1,3 @@ +function rsync --description 'alias rsync rsync -az --info=progress2' + command rsync -az --info=progress2 $argv; +end