Skip to content

Add shell-command keybinding from emacs #2229

Description

@VisenDev

I find myself missing the M-! binding from emacs to run a shell command. A minimal implementation of this in lem would look like this.

(lem:define-command shell-command (cmd) ((:string "Command to run: "))
    (lem-process:run-process
        (uiop:split-string cmd)
           :output-callback (lambda (str) 
                              (lem:message str))))                                        

(lem:define-key lem:*global-keymap* "M-!" 'shell-command) 

I've tried using run-shell, but that doesn't seem to work

0: *shell pid:81579* 
warning: No TTY for interactive shell (tcgetpgrp failed)
setpgid: Inappropriate ioctl for device
 

I also setting lem-shell-mode:*default-shell-command*, to no avail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions