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:
parent
d1fdc9fa63
commit
fb51c8b458
1 changed files with 8 additions and 2 deletions
|
@ -1,6 +1,5 @@
|
||||||
# While I work use a variety of programs, below of some of my more commonly used
|
# 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.
|
# programs that I have decided to support with aliases. # Applications
|
||||||
# Applications
|
|
||||||
# java: jv
|
# java: jv
|
||||||
# tmux: t
|
# tmux: t
|
||||||
# $EDITOR: e
|
# $EDITOR: e
|
||||||
|
@ -76,6 +75,13 @@ function fish_prompt
|
||||||
echo -e "\n$suffix "
|
echo -e "\n$suffix "
|
||||||
end
|
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
|
# Setup fzf for fuzzily finding commands, files, directories
|
||||||
source (fzf-share)/key-bindings.fish && fzf_key_bindings
|
source (fzf-share)/key-bindings.fish && fzf_key_bindings
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue