I have turned on (helm-mode 1) and selectively turned it off for find-file for default emacs behavior, which I prefer. I would also like to restore non-helm behavior for file completion when invoking shell-command. E.g. if I do M-! ls ~/<tab> it currently shows the helm completion buffer. How can I use the default emacs file navigator for shell-command , while keeping helm globally?

1 Answer 1


Answering my own question, here is to create a wrapper to turn off helm-mode for a specific command:

(defun my-shell-command (&optional no-op)
  (let ((completion-in-region-function 'completion--in-region))
    (call-interactively 'shell-command)))
(global-set-key "\M-!" 'my-shell-command)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.