-
-
Notifications
You must be signed in to change notification settings - Fork 648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cider-connect
: also look for Babashka nrepl servers
#3489
Conversation
(replace-regexp-in-string "^n" "" s)))) | ||
(seq-filter #'identity) | ||
car)) | ||
(port (thread-last (split-string (shell-command-to-string (concat "lsof -n -P -Fn -i -a -p " pid)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added the -P
flag, otherwise ports like 1667
would show up as netview-aix-7
since that's "well-known" name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps you can mention this in a comment for future reference.
(when (string-prefix-p "n" s) | ||
(replace-regexp-in-string ".*:" "" s)))) | ||
(seq-filter #'identity) | ||
(seq-filter (lambda (s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some extra filtering, just in case.
cider.el
Outdated
@@ -1914,29 +1914,34 @@ Use `cider-ps-running-lein-nrepls-command' and | |||
(unless (eq system-type 'windows-nt) | |||
(let ((non-lein-nrepl-pids | |||
(thread-last (split-string | |||
(shell-command-to-string "ps u | grep java | grep -v leiningen | grep nrepl.cmdline") | |||
(shell-command-to-string "ps u | grep -E 'java|nrepl.cmdline|--nrepl-server' | grep -v -E 'leiningen|grep'") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nice to mention in a comment example of things this command is supposed to match. (e.g. using clj
and bb
)
Thanks! All done. |
bb nrepls look like this in
ps
:bb --nrepl-server
A couple other refinements included.
No changelog is needed given there are already improvements under the same category.
Cheers - V