Skip to content

Instantly share code, notes, and snippets.

@christiaan-janssen
Last active May 14, 2019 07:17
Show Gist options
  • Save christiaan-janssen/9d15c835153138206eb7bf4386f8ca3e to your computer and use it in GitHub Desktop.
Save christiaan-janssen/9d15c835153138206eb7bf4386f8ca3e to your computer and use it in GitHub Desktop.
Run chef commands from emacs
;;; Package --- Sumary:
;;; Emacs main config file
;;; Commentary:
;;; Code:
(defun parent-directory (dir)
"return parent directory of dir"
(unless (equal "/" dir)
(file-name-directory (directory-file-name dir))))
(defun kitchen-converge ()
"Run chef test kitchen converge"
(interactive)
(cd (parent-directory
(file-name-directory (buffer-file-name))))
(async-shell-command "kitchen converge"))
(provide 'chef)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment