From 5f11045ae01dd5648575d23d7f89c06a6716f589 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Fri, 6 Sep 2024 19:29:18 -0600 Subject: [PATCH] Add ability to edit rspec command before running --- emacs/.emacs.d/config/init-ruby.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/emacs/.emacs.d/config/init-ruby.el b/emacs/.emacs.d/config/init-ruby.el index 7f137cf..50554a8 100644 --- a/emacs/.emacs.d/config/init-ruby.el +++ b/emacs/.emacs.d/config/init-ruby.el @@ -27,6 +27,12 @@ (use-package rspec-mode :hook (dired-mode . rspec-dired-mode) + :config + (defun rspec-compile-command-filter-return (output) + (if current-prefix-arg + (read-string "Command: " output) + output)) + (advice-add 'rspec-compile-command :filter-return #'rspec-compile-command-filter-return) :custom (rspec-use-opts-file-when-available nil))