diff --git a/modules/module-tmux.el b/modules/module-tmux.el index 5bd7f72db..7b8ddead6 100644 --- a/modules/module-tmux.el +++ b/modules/module-tmux.el @@ -33,15 +33,18 @@ (narf/tmux-cd-to-project) (narf/tmux-cd-to-here))) +(defvar narf-tmux-last-command nil "The last command sent to tmux") ;;;###autoload (autoload 'narf:tmux "module-tmux" nil t) (evil-define-operator narf:tmux (&optional command bang) "Sends input to tmux. Use `bang' to append to tmux" :type inclusive - :repeat t (interactive "") + (unless command + (setq command narf-tmux-last-command)) (if (not command) (os-switch-to-term) - (tmux command bang) + (tmux command (not bang)) + (setq narf-tmux-last-command command) (when (evil-ex-p) (message "[Tmux] %s" command)))) @@ -60,11 +63,5 @@ (interactive) (narf/tmux-cd-to-here (narf/project-root))) -;;;;;;;;;; - -;; TODO -;; (defun narf/window (direction) -;; ) - (provide 'module-tmux) ;;; module-tmux.el ends here