瀏覽代碼

Fix du

master
10sr 5 年之前
父節點
當前提交
5d9c88fac8
簽署人: 10sr GPG Key ID: 7BEC428194130EB2
共有 1 個文件被更改,包括 10 次插入5 次删除
  1. +10
    -5
      emacs.el

+ 10
- 5
emacs.el 查看文件

@@ -1845,14 +1845,19 @@ ARG is num to show, or defaults to 7."
(defun dired-get-file-info ()
"Print information of current line file."
(interactive)
(let ((f (shell-quote-argument (dired-get-filename t))))
(if (file-directory-p f)
(let* ((file (dired-get-filename t))
(quoted (shell-quote-argument file)))
(if (file-directory-p file)
(progn
(message "Calculating disk usage...")
(shell-command (concat "du -hsD "
f)))
(let ((du (or (executable-find "gdu")
(executable-find "du")
(error "du not found"))))
(shell-command (concat du
" -hsD "
quoted))))
(shell-command (concat "file "
f)))))
quoted)))))

(defun my-dired-scroll-up ()
"Scroll up."


Loading…
取消
儲存