0

I have an executable (guix) in directory under home. I am using eshell. I add that directory to PATH. But when I run the command, the executable is not found. I have tried various methods such as addpath etc. But eshell doesnt seem to search in that directory and find the executable. If I give the full directory on the command line, it works.

See below:

$ /home/rlemmon/.guix-profile/bin/guix works correctly $ guix does not work

$ echo $PATH $ /home/rlemmon/.guix-profile/bin:/home/rlemmon/bin:/ ... $ addpath /home/rlemmon/.guix-profile/bin/ /home/rlemmon/bin/ ...

  • I would suggest evaluating (getenv "PATH") and then examine the output. If your desired path is not included, then I would suggest evaluating (setenv "PATH" (concat "/home/rlemmon/.guix-profile/bin:" (getenv "PATH"))) -- note the trailing : that is concatenated in the example ... Then try calling your guix executable and see if it works as expected. Eshell uses the process-environment variable, which contains (in part) the PATH. You can also use, C-h v aka M-x describe-variable to examine the process-environment. It is a local-variable in the eshell buffer. – lawlist Mar 20 at 1:16
  • If, for whatever the reason, you do not wish to modify the PATH component of the buffer-local process-environment (normally global, but eshell makes it local), then you may wish to instead work with the variable eshell-command-aliases-list -- again, type C-h v aka M-x describe-variable to read the doc-string. The doc-string recommends to use the alias command to populate the eshell-aliases-file; e.g., alias git /absolute/path/to/my/bin/git $* – lawlist Mar 20 at 1:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.