Function: dired--toggle-b-switch
dired--toggle-b-switch is a byte-compiled function defined in
dired.el.gz.
Signature
(dired--toggle-b-switch)
Documentation
Add or remove b switch and redisplay Dired buffer.
When the current Dired buffer has a file name containing a newline, add
the b switch to the actual switches if it isn't already among them;
otherwise remove the b switch unless it is in dired-listing-switches.
Then redisplay the Dired buffer. This function is called from
post-command-hook in Dired mode buffers.
Source Code
;; Defined in /usr/src/emacs/lisp/dired.el.gz
(defun dired--toggle-b-switch ()
"Add or remove `b' switch and redisplay Dired buffer.
When the current Dired buffer has a file name containing a newline, add
the `b' switch to the actual switches if it isn't already among them;
otherwise remove the `b' switch unless it is in `dired-listing-switches'.
Then redisplay the Dired buffer. This function is called from
`post-command-hook' in Dired mode buffers."
(when (eq major-mode 'dired-mode)
(if (and (dired--filename-with-newline-p) dired-auto-toggle-b-switch)
(unless (dired-switches-escape-p dired-actual-switches)
(setq dired-actual-switches (concat dired-actual-switches " -b"))
(dired-revert))
(unless (dired-switches-escape-p dired-listing-switches)
(when (dired-switches-escape-p dired-actual-switches)
(setq dired-actual-switches (dired--remove-b-switch))
(dired-revert))))))