add dired helm sorting function
This commit is contained in:
parent
86340ab4a2
commit
22a39e7602
17
conf.org
17
conf.org
|
@ -531,6 +531,23 @@ according to mime types as listed in all available desktop files."
|
|||
:candidates mime-alist
|
||||
:action '(("Open" . (lambda (f) (nd/execute-desktop-command f file-list)))))
|
||||
:buffer "*helm open with*"))))))
|
||||
|
||||
(defun nd/dired-sort-by ()
|
||||
"Sort current dired buffer by a list of choices presented in helm menu.
|
||||
Note this assumes there are no sorting switches on `dired-ls'"
|
||||
(interactive)
|
||||
(let ((sort-alist '(("Name" . "")
|
||||
("Date" . "-t")
|
||||
("Size" . "-S")
|
||||
("Extension" . "-X")
|
||||
("Dirs First" . "--group-directories-first"))))
|
||||
(helm
|
||||
:sources
|
||||
(helm-build-sync-source "Switches"
|
||||
:candidates sort-alist
|
||||
:action
|
||||
'(("Sort" . (lambda (s) (dired-sort-other (concat dired-listing-switches " " s))))))
|
||||
:buffer "*helm sort buffer*")))
|
||||
#+END_SRC
|
||||
** compression
|
||||
Only supports tar.gz, tar.bz2, tar.xz, and .zip by default. Add support for more fun algos such as lzo and zpaq
|
||||
|
|
Loading…
Reference in New Issue