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:
parent
83dde6adc9
commit
a1f0acfd87
|
@ -362,6 +362,16 @@ output, separated by \\n, when called with
|
||||||
(message "No files return by command “%s”" command)
|
(message "No files return by command “%s”" command)
|
||||||
(dired (cons "Command output" list-of-files)))))
|
(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)
|
(defun db/system-open (path)
|
||||||
"Open PATH with default program as defined by the underlying system."
|
"Open PATH with default program as defined by the underlying system."
|
||||||
(cond
|
(cond
|
||||||
|
|
Loading…
Reference in New Issue