How do I hide number of links in dired?

匆匆过客 提交于 2019-12-06 06:07:50

To control how things are displayed in dired, you can customize the variable dired-listing-switches. However, as you noted, not displaying the number of links is not an option.

A slightly different approach would be to use the package dired-details, which hides all details until you want them. This hides the number of links (but also hides other information). Follow the link to find the package (and a dired-details+ which sounds like it fixes a couple minor inconveniences with dired-details).

Original answer information follows:

(setq dired-listing-switches "-l")

From the "Entering Dired" info page:

The variable dired-listing-switches' specifies the options to give tols' for listing the directory; this string must contain -l'. If you use a numeric prefix argument with thedired' command, you can specify the ls' switches with the minibuffer before you enter the directory specification. No matter how they are specified, the ls' switches can include short options (that is, single characters) requiring no arguments, and long options (starting with --') whose arguments are specified with='.

You can use ls-lisp to customize the dired buffer display. ls-lisp is part of GNU Emacs (22.1 or perhaps even earlier) ls-lisp has a ls-lisp-verbosity customize variable that will allow you to show/hide "links", "uid" and "gid". It also has other things that may tickle your customize fancy.

I like ls-lisp so much I use it everywhere, on my Windows and even Linux sessions.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!