I find that I’m regularly caught in this pattern:
$ foo --with some arguments maybe foo: command not found $ nix-shell -p foo $ ↑ $ <some other command shows up>
I.e. I want to get
foo available, but preferably without opening a new shell.
I know it’s possible to load the effect of
nix-shell into an existing shell, because
direnv can do it. But what is the easiest way? Is there a shell alias worth adding to my environment (or, preferably, to the default environment on a nix system) that amends the current shell with what’s necessary to make a nixpkgs package available?