Last active
December 9, 2016 20:30
-
-
Save colstrom/41535598618e5553cce9a2037b150023 to your computer and use it in GitHub Desktop.
list.fish: coerces arguments into lists
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 = list | |
| author = Chris Olstrom | |
| license = MIT | |
| provides = fish/functions/list | |
| requires | |
| fish/builtin/case | |
| fish/builtin/count | |
| fish/builtin/echo | |
| fish/builtin/end | |
| fish/builtin/for | |
| fish/builtin/function | |
| fish/builtin/read | |
| fish/builtin/switch | |
| fish/builtin/while | |
| fish/functions/list |
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 list | |
| switch (count $argv) | |
| case 0 | |
| while read object | |
| list $object | |
| end | |
| case '*' | |
| for arg in $argv | |
| echo $arg | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment