;;; Jira --- A simple wrapper around ZDI ;;; Commentary: ;;; Emacs integration for ZDI. ;;; Code: (provide 'zdi) (require 'projectile) (defun projectile-get-relative-path-buffer () "Get the project-relative path of the current buffer." (file-relative-name buffer-file-name (projectile-project-root))) (defvar zdi-build-command-format "source ~/git/zendesk/zdi/dockmaster/zdi.sh function strip-colors() { gsed -r \"s/\\x1B\\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g\" } zdi help_center -d run bundle exec rspec %s | strip-colors ") (defun zdi-set-compile-command () "Set the command used to compile your project to run rspec through zdi." (set (make-local-variable 'compile-command) (format zdi-build-command-format (projectile-get-relative-path-buffer)))) ;;; zdi.el ends here