4 ms·
Along the same lines: https://github.com/geophile/osh https://github.com/geophile/osh Osh (Object shell) is a command-line utility for running sequences of ope
by geophile 8y ago
Along the same lines: https://github.com/geophile/osh https://github.com/geophile/osh
Osh (Object shell) is a command-line utility for running sequences of operations connected by a pipe-like construct. Objects are piped, not strings. Included in the sequence of operations may be remote sequences of command, which run on all nodes of a cluster. For example, if you have configured a cluster named foo, then you can get the pid and commandline of every node of your cluster like this:
osh @foo [ ps ^ f 'p: (p.pid, p.commandline)' ] $
- osh: Invokes the interpreter
- @foo [ ... ]: Run the bracketed commands on every node of cluster foo.
- ps: The osh ps command, which yields a stream of Process objects.
- ^: The osh pipe symbol
- f: Function application. The function in this case takes a Process p, and returns a tuple containing the process's pid and command line.
- $: Print the contents of the input stream, one per line.
This is a python tool, so the stuff piped between operations are python objects.
- sjellis 8y agoI casually follow the development of the Elvish shell, which uses structured data, and is written in Go: https://elv.sh/ https://elv.sh/ The latest release has a package manager for plugins, so hopefully we'll see more support for remote stuff through that route. PowerShell has some great ideas, but it seems doomed to mostly be a quirk of Windows at this point. I'd really love to see a more modern shell than bash get adoption across the industry.
- geophile 8y agoHadn't heard about Elvish, thanks for the reference. I've thought about a new version of osh, making it less of a command-line utility, and more of a shell. What do you think would be the main properties of a "more modern shell"? Do you think it is OK if this shell drags in a Python interpreter?