mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-27 19:53:36 +08:00
26 lines
442 B
Plaintext
26 lines
442 B
Plaintext
# Test events.
|
|
|
|
# This pattern caused a crash; github issue #449
|
|
|
|
set -g var before
|
|
|
|
function test1 --on-event test
|
|
set -g var $var:test1
|
|
functions -e test2
|
|
end
|
|
|
|
function test2 --on-event test
|
|
# this should not run, as test2 gets removed before it has a chance of running
|
|
set -g var $var:test2a
|
|
end
|
|
emit test
|
|
|
|
echo $var
|
|
|
|
|
|
function test3 --on-event test3
|
|
echo received event test3 with args: $argv
|
|
end
|
|
|
|
emit test3 foo bar
|