$result(5)$result - Various command return values
$result returnValue
$result is used to return the results of several commands:
set-variable %filename @ml "Enter file name" shell-command &cat "test -f " %filename !if &equ $result 0 ml-write "file exists" !else ml-write "file does not exists" !endif
In the case of ipipe-shell-command, $result is only set to the exit status of the system process during the final call to the buffer-ipipe-command, for more information see help for variable $buffer-ipipe(5).
$result is used to return the number of substitutions, the final replace mode ('a' for all, 'l' for last or 'q' for query) and the replace with string in a list.
$result is used to return information on the current word, the information depends on the argument given to spell.
For more information see the help pages on referenced commands and variables.
The current value of $result is lost on the next command call which uses it. As a call to create-callback(2) can cause the execution of a macro to interrupt another which is waiting for user input, the value of $result should be copied before getting user input.
buffer-info(2), change-font(2), copy-file(3), count-words(2), create-callback(2), delete-file(3), describe-key(2), file-op(2), find-registry(2), generate-hash(2), goto-alpha-mark(2), indent(2), ipipe-shell-command(2), major-mode(2), mark-registry(2), osd(2), pipe-shell-command(2), query-replace-string(2), replace-string(2), search-buffer(2), set-char-mask(2), shell-command(2), show-region(2), spell(2), generate-password(3), @mx(4), $file-names(5), $status(5).
(c) Copyright JASSPA 2026
Last Modified: 2026/02/21
Generated On: 2026/03/01