Handle process and terminal correctly.
This commit is contained in:
parent
74afca1354
commit
2232786316
3 changed files with 14 additions and 5 deletions
|
@ -34,14 +34,17 @@
|
|||
(import scheme
|
||||
(chicken base)
|
||||
(chicken process-context)
|
||||
(chicken process))
|
||||
(chicken process)
|
||||
ansi)
|
||||
|
||||
;; Starts an editor on given file
|
||||
(define (edit-file file-path)
|
||||
(print "Editing...")
|
||||
(let* ((edvar (get-environment-variable "EDITOR"))
|
||||
(editor (or edvar "editor")))
|
||||
(process-run editor (list file-path))
|
||||
))
|
||||
(editor (or edvar "editor"))
|
||||
(pid (process-run editor (list file-path))))
|
||||
(process-wait pid)
|
||||
(clrscr)
|
||||
(flush-output)))
|
||||
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue