Skip to main content
edited tags
Link
NickD
  • 33.6k
  • 3
  • 30
  • 47
Source Link

`shell-command` output not working when in a function

I have

(shell-command-to-string "ls")

which works just fine but when I put it in a function it breaks as

(defun testing ()
  (shell-command-to-string "ls")
)

outputs nil. I am new to elisp so I am clearly missing something. Can someone point me in the right direction?