Last active
November 17, 2023 10:39
-
-
Save knollet/24b8f3eb40c969d81291f2f8a6e4871d to your computer and use it in GitHub Desktop.
start an ansi-term with a reasonable name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; tmacs | |
(defvar tmacs--counter 0) | |
(defun tmacs--find-free-number () | |
(cl-do ((num 0 (+ 1 num))) | |
((not (get-buffer (format "*tmacs<%s>*" num))) | |
num))) | |
(defun tmacs () | |
(interactive) | |
(ansi-term "/bin/bash" (format "tmacs<%s>" (tmacs--find-free-number)))) | |
(global-set-key (kbd "<f12> t") 'tmacs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment