Fix #1703: blank dired over TRAMP
When the remote system does not have GNU ls installed.
This commit is contained in:
parent
4d8647fe7a
commit
a9919a5360
1 changed files with 13 additions and 0 deletions
|
@ -30,6 +30,19 @@
|
||||||
(setq args (delete "--group-directories-first" args))))
|
(setq args (delete "--group-directories-first" args))))
|
||||||
(setq dired-listing-switches (string-join args " ")))
|
(setq dired-listing-switches (string-join args " ")))
|
||||||
|
|
||||||
|
(add-hook! 'dired-mode-hook
|
||||||
|
(defun +dired-disable-gnu-ls-flags-in-tramp-buffers-h ()
|
||||||
|
"Fix #1703: opening directories over TRAMP in dired displays a blank screen.
|
||||||
|
|
||||||
|
This is because there's no guarantee the remote system has GNU ls, which is the
|
||||||
|
only variant that supports --group-directories-first."
|
||||||
|
(when (file-remote-p default-directory)
|
||||||
|
(setq-local dired-listing-switches
|
||||||
|
(string-join
|
||||||
|
(split-string dired-listing-switches
|
||||||
|
"--group-directories-first")
|
||||||
|
" ")))))
|
||||||
|
|
||||||
(define-key! dired-mode-map
|
(define-key! dired-mode-map
|
||||||
;; Kill buffer when quitting dired buffers
|
;; Kill buffer when quitting dired buffers
|
||||||
[remap quit-window] (λ! (quit-window t))
|
[remap quit-window] (λ! (quit-window t))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue