Add custom function to list git-annex files via dired

This can already be done by using `db/dired-from-shell-command`, but it's more
convenient to have a specific command for this.
This commit is contained in:
Daniel - 2021-08-24 10:18:36 +02:00
parent 83dde6adc9
commit a1f0acfd87
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 10 additions and 0 deletions

View File

@ -362,6 +362,16 @@ output, separated by \\n, when called with
(message "No files return by command “%s”" command)
(dired (cons "Command output" list-of-files)))))
(defun db/dired-from-git-annex (matching-options)
"Display files found by git annex with MATCHING-OPTIONS.
This runs git annex find with MATCHING-OPTIONS (a string) in
`default-directory' and displays the resulting set of files using
`dired'."
(interactive (list (read-string (format "Matching Options (in %s): "
default-directory))))
(db/dired-from-shell-command (format "git annex find . %s" matching-options)
default-directory))
(defun db/system-open (path)
"Open PATH with default program as defined by the underlying system."
(cond