Support nix-eval fish function

Wrapping the `nix eval` incantation in a fish function for two reasons:
1. Document that this is how to evaluate Nix from a file.
2. Provide a more ergonomic way of evaluating Nix from a file.
This commit is contained in:
William Carroll 2020-01-27 11:39:02 +00:00
parent d1fdc9fa63
commit fb51c8b458

View file

@ -1,6 +1,5 @@
# While I work use a variety of programs, below of some of my more commonly used
# programs that I have decided to support with aliases.
# Applications
# programs that I have decided to support with aliases. # Applications
# java: jv
# tmux: t
# $EDITOR: e
@ -76,6 +75,13 @@ function fish_prompt
echo -e "\n$suffix "
end
function nix-eval --description 'Evaluate Nix expression from file, $1.'
# Notice the empty string at the end of the invocation here. This is
# intentional. For more information, see this issue:
# https://github.com/NixOS/nix/issues/2078
nix eval --file $argv[1] ""
end
# Setup fzf for fuzzily finding commands, files, directories
source (fzf-share)/key-bindings.fish && fzf_key_bindings