$buffer-names - Filtered buffer name list
$buffer-names must first be set to the required filter string, if the variable is evaluated before it is initialized the value will be set to "ABORT" and the command will fail. The filter takes the form of a regex.
Once initialized, evaluating $buffer-names returns the name of the next buffer which matches the filter until no more buffers are found, in which case an empty string is returned.
set-variable $buffer-names ".*" !while ¬ &seq &set #l0 $buffer-names "" 100 ml-write &cat "buffer: " #l0 !done
The following example is the same except it lists only the buffers which are not directory listings
set-variable $buffer-names ".*[^/]" !while ¬ &seq &set #l0 $buffer-names "" 100 ml-write &cat "buffer: " #l0 !done
The list of buffers is evaluated when the variable is initialized, buffers created after the initialization will not be included in the list.
Deleting buffers which are in the list, before they are evaluated, will have undefined effects.
Copyright (c) 1998-2006 JASSPA
Last Modified: 2002/01/11
Generated On: 2006/10/07