-
-
Notifications
You must be signed in to change notification settings - Fork 413
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
Make --eval print values to the shell #1453
Comments
Command that doesn't print anything, even though it should: |
Any idea how to do this? For now all I have in mind is that the remote evaluator should open its own temporary socket and send 2 commands to the server: 1 with the remote socket information, 1 with the actual command. There must be a simpler way though, no? |
Forget what I said: Unix sockets are bidrectional, this works: (iolib:with-open-socket (s :address-family :local :remote-filename "foo.socket")
(write-string "foo" s)
(read-line s)) and on the Nyxt server side, write to the accepted connection. |
I don't see any issues here. It does seem to print values to stdout. $ nyxt --remote --quit --eval '4'
(process:31943): Gtk-WARNING **: 16:16:17.309: Locale not supported by C library.
Using the fallback 'C' locale.
<INFO> [16:16:17] Probing remote instance listening to /run/user/1000/nyxt/nyxt.socket.
<INFO> [16:16:17] External evaluation request: "4"
4
$ nyxt --remote --quit --eval '(nyxt:current-buffer)'
(process:31964): Gtk-WARNING **: 16:16:35.845: Locale not supported by C library.
Using the fallback 'C' locale.
<INFO> [16:16:35] Probing remote instance listening to /run/user/1000/nyxt/nyxt.socket.
<INFO> [16:16:35] External evaluation request: "(nyxt:current-buffer)"
#<WEB-BUFFER 1665 {1007EDB4C3}> EDIT: The above works because Then this is a bug, not a feature request. |
Yes, that's a bug. |
I'm not sure how to fix this bug since I don't know much about Unix sockets. My primitive understanding is that when we connect to the socket and send a sexp ( |
I don't think it's a bug: the To fix this, we need to go as I mentioned in #1453 (comment), but sionescu/iolib#79 is kind of blocking here. |
This would allow to create Nyxt front-ends (like the one discussed on IRC recently) and have better shell interaction in general.
The text was updated successfully, but these errors were encountered: