Hi, I want to add an eshell alias ex alias ll="ls -l"
where should I do that ?
also my project is using direenv
and would like to initialize that when in eshell. this is what I have to add in bash eval "$(direnv hook bash)"
any leads on how I can accomplish the same for eshell ?
I don’t think it’s possible. eshell is simply not supported.
hmm and how about the alias ?
(defalias 'll "ls -la")
iirc
of, no.
or just running a command - ssh-add /home/myuser/.ssh/id_rsa
So I am not sure if and how ssh-agent
is able to work within eshell
environment.
But from what I see, it’s working just fine.
But you shouldn’t expect that sh
-specific utilities will work in eshell
.
great thanks, I am using ansiterm as you had suggested
Are you sure you want to use eshell
?
Because, from what you are saying, it seems like a bad choice for you.
Has anyone ever run into the below issue trying to start a repl: [nREPL] Starting server via "c:/Program Files/Leiningen/lein.bat" update-in :dependencies conj ^"[nrepl \^"0.8.2\^"]^" -- update-in :plugins conj ^"[refactor-nrepl \^"2.5.0\^"]^" -- update-in :plugins conj ^"[cider/cider-nrepl \^"0.25.4\^"]^" -- repl :headless :host localhost error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: java.lang.NumberFormatException: Invalid number: 0.8.2 at clojure.lang.LispReader.readNumber (LispReader.java:352) clojure.lang.LispReader.read (LispReader.java:278) clojure.lang.LispReader.readDelimitedList (LispReader.java:1398) clojure.lang.LispReader$VectorReader.invoke (LispReader.java:1347) clojure.lang.LispReader.read (LispReader.java:285) clojure.lang.LispReader.read (LispReader.java:216) clojure.lang.LispReader.read (LispReader.java:205)
can you elaborate more on this ? why could this be a problem ?
I am using a leiningen plugin which uses ssh, and thus my ssh key needs to be added to the agent.
@murtaza52 If you cannot find help using eshell, you could use your operating system shell from within Spacemacs. Then any configuration of the OS shell should be available. https://practicalli.github.io/spacemacs/install-spacemacs/eshell.html#multi-term---use-operating-system-shell
My first guess would be to check for a .lein/profiles.clj
file, which I assume should be in what ever Windows thinks is your home directory.
If that fle it exists, try move it to a different location or rename the file.
Otherwise it sounds like a bug with the windows install of Leiningen or a bug in cider. Possibly with the path not being interpreted correctly.
I do not have a windows system to try and replicate the issue, sorry.
@jr0cket thanks, I think that works better for now
Thanks let me try those options. I've tried starting the repl using powershell and lein directly and it works (lein repl). Let me try this. I've never seen this error.
@murtaza52 or just use ansi-term
instead of eshell
.
So basically things like direnv
expect sh-compliant shell.
There might be some problems trying to use them in eshell
.
Depending on the actual software. Many of those utilities define new aliases, functions - those things won’t work in eshell
.
ssh-agent
should work - you should be able to perform ssh-add
assuming SSH_AUTH_SOCK
gets set correctly in eshell
from parent process.
> env
(...)
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.tfJGULxVPd/Listeners
(...)
But ~/.profile
is only executed by sh-compliant shells which eshell
is not.
And IIRC everything you want to have in .profile
should be translated into elisp
code put into .emacs
@murtaza52 or vterm if you want the latest way of using a terminal in Spacemacs https://develop.spacemacs.org/layers/+tools/shell/README.html#install-vterm
If the issue is related to windows, there is the #clj-on-windows channel. The error suggests to me that its not reading the auto-injected dependencies from Cider correctly. You could try getting the command line from the Spacemacs message buffer, SPC b m
, it should show the command that cider-jack-in used to try start the repl. Or failing that, use SPC u
before cider-jack-in to see the command. Then try that command using a windows terminal / powershell...
It looks like its this command: update-in :dependencies conj "[nrepl \"0.8.2\"]" -- update-in :plugins conj "[refactor-nrepl \"2.5.0\"]" -- update-in :plugins conj "[cider/cider-nrepl \"0.25.4\"]" -- repl :headless :host localhost and I can see where its reading the 0.8.2 where its failing. Running this with "ava.lang.RuntimeException: EOF while reading"
After bouncing into this article: https://www.gitmemory.com/issue/clojure-emacs/cider/2890/674136255 Removing java jdk and installing Java Runtime.. solved the problem. Now idea why the JDK wouldn't work. Thanks for all your help and an awesome tool.
Glad its resolved, I would not have thought of changing from JDK to JRE.