Skip to content

Commit a1e16c6

Browse files
committed
Tell comint to set TERM=emacs for fsi, and don't force using a pipe
We want to be able to use fsi's tab-completion, but we can't if we have to pass --readline- as it turns off readline support. comint reports itself as a dumb-terminal by default, which causes fsi to treat it like one. Setting TERM=emacs (or likely and value that's not 'dumb') appears to let us interact with fsi in the way we want to. The previous combination of (process-connection-nil) and setting --readline- was probably done to get around fsi's behavior when using a pty and TERM=dumb, but Im not 100% sure of that. This setup for init-ing the inferior fsharp process might need revisted in the future.
1 parent b0fa4f2 commit a1e16c6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: inf-fsharp-mode.el

+8-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,14 @@ be sent from another buffer in fsharp mode.
9090
(or cmd (read-from-minibuffer "fsharp toplevel to run: "
9191
inferior-fsharp-program)))
9292
(let ((cmdlist (inferior-fsharp-args-to-list inferior-fsharp-program))
93-
(process-connection-type nil))
93+
;; fsi (correctly) disables any sort of console interaction if it
94+
;; thinks we're a dumb terminal, and `comint-term-environment'
95+
;; (correctly) defaults to setting TERM=dumb on systems using
96+
;; terminfo, which is basically every modern system.
97+
;;
98+
;; we want to make use of fsi's tab completion, so tell comint
99+
;; to set TERM=emacs for our inferior fsharp process.
100+
(comint-terminfo-terminal "emacs"))
94101
(with-current-buffer (apply (function make-comint)
95102
inferior-fsharp-buffer-subname
96103
(car cmdlist) nil

0 commit comments

Comments
 (0)