dotfiles/fish/.config/fish/functions/dpw.fish
Sanchayan Maity 0d0480a6b2 fish: Make all aliases into functions
Using alias inside ~/.config/fish/config.fish can slow down shell
start as each alias/function will be eagerly loaded.

alias is slow because it involves eval.

functions support lazy/auto loading.
https://fishshell.com/docs/current/tutorial.html#autoloading-functions
2021-12-10 19:50:19 +05:30

4 lines
219 B
Fish

function dpw --wraps=pw-dump\ \|\ jq\ \|\ nvim\ -c\ \'setlocal\ ft=json\'\ -R --description alias\ dpw=pw-dump\ \|\ jq\ \|\ nvim\ -c\ \'setlocal\ ft=json\'\ -R
pw-dump | jq | nvim -c 'setlocal ft=json' -R $argv;
end