help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

system-command-exists-p


From: Andreas Roehler
Subject: system-command-exists-p
Date: Mon, 07 Dec 2009 08:17:59 +0100
User-agent: Thunderbird 2.0.0.19 (X11/20081227)

Hi,

needed a check if a command exists on system.
Employed the following:

(defun system-command-exists-p (command)
  "Return t if COMMAND is available on system. "
  (let* ((cmd (format "type %s" command)))
    (eq 0 (shell-command cmd))))

Any comments/suggestions?

Andreas

--
https://code.launchpad.net/s-x-emacs-werkstatt/
http://bazaar.launchpad.net/~a-roehler/python-mode/python-mode.el/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]