Last active
December 9, 2016 06:46
-
-
Save colstrom/b8a1f2ceddd6295eb428ca1159c63fef to your computer and use it in GitHub Desktop.
show-source.fish: pretty-prints function definitions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name = show-source | |
| author = Chris Olstrom | |
| license = MIT | |
| provides = fish/functions/show-source | |
| requires | |
| command/fish_indent | |
| fish/builtin/case | |
| fish/builtin/count | |
| fish/builtin/end | |
| fish/builtin/function | |
| fish/builtin/functions | |
| fish/builtin/read | |
| fish/builtin/switch | |
| fish/builtin/while | |
| fish/functions/list | |
| fish/functions/show-source |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function show-source | |
| switch (count $argv) | |
| case 0 | |
| while read --local name | |
| functions $name | fish_indent --ansi | |
| end | |
| case '*' | |
| list $argv | show-source | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment