Other Editors can create new documents from text that is piped into their commandline tools.
I implemented that future the way (Mac)Vim has implemented it: when the first filename is "-" than it reads the text from stdin.
Example: the following command opens a new document in the current window with the output of ls in it.
$ ls -l | vicotool -
Updated usage text:
syntax: vicotool [options] [file ...] edit specified file(s)
or: vicotool [options] - read text from stdin
options:
-h show this help
-e string evaluate the string as a Nu script
-f file read file and evaluate as a Nu script
-n open files in a new window
-p params read script parameters as a JSON string
-p - read script parameters as JSON from standard input
-r enter runloop (don't exit script immediately)
-w wait for document to close
This is my first Pull Request ever, so I hope i have done everything correct :)
Other Editors can create new documents from text that is piped into their commandline tools. I implemented that future the way (Mac)Vim has implemented it: when the first filename is "-" than it reads the text from stdin.
Example: the following command opens a new document in the current window with the output of ls in it.
Updated usage text:
This is my first Pull Request ever, so I hope i have done everything correct :)