5 ms·
Object SHell
- phreakocious 3y agoSome PowerShell vibes here. Interesting project.
- forgotpwd16 3y agoIt's mentioned in a linked page: http://geophile.com/osh/similar.html http://geophile.com/osh/similar.html. >One major difference is that osh is designed to be used from within an existing shell, such as bash; while PowerShell, due to the absence of well-developed shells in the Windows world, is a complete shell.
- vishnumenon 3y agoSeems similar in spirit to Nushell[0], which is a project I'm really rooting for, a super interesting update of the shell/pipes framework [0]: https://www.nushell.sh/ https://www.nushell.sh/
- Metus 3y agoSome stuff I'd love to see implemented: - Typed inputs and IntelliSense. There is very basic support for types, even so, I'd love even more strict types and type inference as in Typescript, so my terminal and shell can give me a hint what kind of input the command is expecting. At the same time, IntelliSense should tell me what command flags are still available and what are viable inputs, like cd suggesting only directories, or kubectl --namespace suggesting available namespaces. - A concept of past commands as building blocks and/or interactive data wrangling. Many times I am mucking around in zsh to find a chain of commands that reliably gets the data I need out of some CSV or other source, retyping the same few commands with some new links until it works the way I want it to. - A command like EXPLAIN in SQL so I can see where I should rethink what I am doing so I can refactor that part of the chain. At the same time, I'd love it if I could take one of those magic snippets from Stack Overflow and have an EXPLAIN-like command pick the components apart and explain the flags via some structured docstring format. - Snippets in the Shell for some regularly used patterns of command chains. - The concept of transactions, like in SQL, so I can run a command or script without worrying about it failing halfway through - the shell automatically undoing its changes. Maybe this should work on the level of a shell session even.
- geophile 3y agoMarcel (my successof of osh) supports using past commands in a few ways: 1) Command recall, like any shell. 2) Edit of a previous command, giving you access to the command in $EDITOR. 3) Abstraction. For example, suppose you want to find all files recursively, looking for those changed in the last 3 days. You could write: ls -fr | select (f: now() - f.mtime() < days(3)) To turn this selection into a reusable command: recentN = (| N: select (f: now() - f.mtime() < days(int(N))) |) This is basically a function on a streams, that takes an input N, and filters for files that changed in the last N days. To use it: ls -fr | recent 3 I don't understand what EXPLAIN would do. In SQL, EXPLAIN helps you see the actual implementation chosen for a non-procedural statement. Marcel, nushell, etc. have no optimizer, so there is no invisible execution plan, that would be made visible using EXPLAIN. Transactions: Might be feasible with a shell built on some kind of COW filesystem, but I'm dubious of how much transaction isolation is really possible even then.
- geophile 3y agoCheck out marcel: https://marceltheshell.org https://marceltheshell.org, and https://github.com/geophile/marcel https://github.com/geophile/marcel. Both marcel and nushell start with the idea of piping structured data instead of strings, which is incredibly powerful. (This also applies to osh. I am the author of osh and marcel.) Marcel (and osh) rely on Python types and language where typical shells have sublanguages. So instead of awk or find and their sublanguages, you just use Python. Instead of piping strings, you pipe streams of Python values. Marcel lets you use Python on the commmand line. It also has an API which allows you to use shell-like commands inside of Python programs.
- ranting-moth 3y agoGitHub repo says it's obsolete: https://github.com/geophile/osh https://github.com/geophile/osh
- hiatus 3y agoIndeed, the new incarnation appears to be Marcel https://github.com/geophile/marcel https://github.com/geophile/marcel
- forgotpwd16 3y agoMarcel seems very similar to Xonsh, another Python-based shell.
- geophile 3y agoIt does. However, instead of trying and sometimes failing to support Python in the shell, Marcel limits Python to well-defined contexts, always delimited by parens. Also, Marcel has a Python API so that you can use shell-like commands and piping inside of Python programs. Lots of examples here: https://marceltheshell.org https://marceltheshell.org
- pwdisswordfishc 3y agoNot to be confused with OSH. https://www.oilshell.org/cross-ref.html?tag=OSH#OSH https://www.oilshell.org/cross-ref.html?tag=OSH#OSH
- deleted 3y ago[deleted]
- zokier 3y agoWorth pointing out that osh wiki has a list of all sorts of alternative shells if you like this kind of stuff: https://github.com/oilshell/oil/wiki/Alternative-Shells https://github.com/oilshell/oil/wiki/Alternative-Shells
- 0xbadcafebee 3y ago(2006)
- geophile 3y agoThank you, kind stranger. I am the author of object shell. This project is obsolete, superseded by Marcel, which I also wrote. https://gitHub.com/geophile/marcel https://gitHub.com/geophile/marcel. Marcel has a lot in common with nushell, but relies on Python syntax and types instead of inventing a lot of new language.
- bandie91 3y agohttps://www.marceltheshell.org/ https://www.marceltheshell.org/ Your Browser Is No Longer Supported ffox 2 can display text and images. actually had to turn off JS to degrade gracefully.