Permalink
Please sign in to comment.
Browse files
Implement part of the compgen builtin: compgen -A function (#174)
- Loading branch information...
Showing
with
45 additions
and 5 deletions.
- +23 −1 core/builtin.py
- +1 −4 core/cmd_exec.py
- +17 −0 spec/compgen.test.sh
- +4 −0 test/spec.sh
| @@ -0,0 +1,17 @@ | ||
| #!/usr/bin/env bash | ||
| #### Print function list | ||
| add () { expr 4 + 4; } | ||
| div () { expr 6 / 2; } | ||
| ek () { echo hello; } | ||
| __ec () { echo hi; } | ||
| _ab () { expr 10 % 3; } | ||
| compgen -A function | ||
| ## status: 0 | ||
| ## STDOUT: | ||
| __ec | ||
| _ab | ||
| add | ||
| div | ||
| ek | ||
| ## END |
0 comments on commit
92051ae