From aab5bfd074e57d06a79e39d7c7c4760e1f385a06 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 17 Oct 2022 21:41:28 -0500 Subject: Bankruptcy 9 --- lisp/find-script.el | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 lisp/find-script.el (limited to 'lisp/find-script.el') diff --git a/lisp/find-script.el b/lisp/find-script.el deleted file mode 100644 index 9e3633a..0000000 --- a/lisp/find-script.el +++ /dev/null @@ -1,36 +0,0 @@ -;;; find-script.el --- Find a script in $PATH -*- lexical-binding: t; -*- - -;;; Commentary: - -;; This package makes it easier to find a script to edit in $PATH. The initial -;; `rehash-exes' is slow, but it's stored in `*exes*' as a caching mechanism. -;; However, I'm sure it could be improved. - -;; In addition, `*exes*' currently contains /all/ executables in $PATH, which -;; ... maybe only the ones stored in some text format should be shown. - -;;; Code: - -(defvar *exes* nil - "All the exectuables in $PATH. -Run `rehash-exes' to refresh this variable.") - -(defun rehash-exes () - "List all the executables in $PATH. -Also sets `*exes*' parameter." - (setq *exes* - (cl-loop for dir in exec-path - append (file-expand-wildcards (concat dir "*")) - into exes - finally return exes))) - -;;;###autoload -(defun find-script (script) - "Find a file in $PATH." - (interactive - (list (let ((exes (or *exes* (rehash-exes)))) - (completing-read "Script> " exes nil t)))) - (find-file script)) - -(provide 'find-script) -;;; find-script.el ends here -- cgit 1.4.1-21-gabe81