Function: ibuffer-filter-by-directory
ibuffer-filter-by-directory is an autoloaded, interactive and
byte-compiled function defined in ibuf-ext.el.gz.
Signature
(ibuffer-filter-by-directory QUALIFIER)
Documentation
Limit current view to buffers with directory matching QUALIFIER.
For a buffer associated with file '/a/b/c.d', this matches
against '/a/b'. For a buffer not associated with a file, this
matches against the value of default-directory in that buffer.
Probably introduced at or before Emacs version 26.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/ibuf-ext.el.gz
;;;###autoload (autoload 'ibuffer-filter-by-directory "ibuf-ext")
(define-ibuffer-filter directory
"Limit current view to buffers with directory matching QUALIFIER.
For a buffer associated with file '/a/b/c.d', this matches
against '/a/b'. For a buffer not associated with a file, this
matches against the value of `default-directory' in that buffer."
(:description "directory name"
:reader (read-from-minibuffer "Filter by directory name (regex): "))
(ibuffer-aif (with-current-buffer buf (ibuffer-buffer-file-name))
(let ((dirname (file-name-directory it)))
(when dirname (string-match qualifier dirname)))
(when default-directory (string-match qualifier default-directory))))