functions: list caller-exit handlers correctly

`functions --handlers-type caller-exit` did not list any functions, while
`functions --handlers-type process-exit` listed both process-exit and
caller-exit handlers:

$ echo (function foo --on-job-exit caller; end; functions --handlers-type caller-exit | grep foo)

$ echo (function foo --on-job-exit caller; end; functions --handlers-type process-exit | grep foo)
caller-exit foo
This commit is contained in:
Xiretza
2023-02-11 12:44:31 +01:00
committed by Johannes Altmanninger
parent 4a1a59c5a8
commit ba0bfb9df7
3 changed files with 6 additions and 1 deletions

View File

@@ -0,0 +1,4 @@
#RUN: %fish %s
echo (function foo1 --on-job-exit caller; end; functions --handlers-type caller-exit | grep foo)
# CHECK: caller-exit foo1
echo (function foo2 --on-job-exit caller; end; functions --handlers-type process-exit | grep foo)