Open Thesola10 opened 2 years ago
We could substitute command names in place, allowing for universal support, by using nix build nixpkgs#attr
to populate the path, then nix eval --raw nixpkgs#attr
to retrieve and patch it in.
The zle
widget will basically be the next generation of comma-assistant
, without comma
, so maybe I could call it zsh-nix-assistant
instead?
Being able to hook directly into the build
+eval
system would even allow us to speed up command relaunching compared to comma
, as well as retain some offline functionality/show a useful message along the lines of <command>: could not build using nix
Adding support for
sudo
and such would actually involve pulling the binary path from the Nix store and patching it into the first argument for the prefixed command. Not only does that require reimplementingcomma
functionality into the plugin itself, it also depends on proper command detection and replacement -- instead of hijackingcommand_not_found
, the plugin would edit the command line itself, requiring azle
widget.