Neat! If I can make one suggestion: I know this is usually not at all what people should with websites, but consider hijacking basic browser hotkeys to augment the shell. Tab for auto complete instead of select next element would be a good start, and I think in this type of situation its acceptable to hijack.
The first command I ran was `ls`, which worked as expected, but then I tried running `./cowsay blah`, which didn't work. I wasn't sure how to run it until eventually I guessed `sh cowsay blah`, and it worked.
Maybe make the `./` shortcut for executing stuff?
While I'm not sure how much work it would be, it might also be kind of cool to implement the `cd` command as well.
I have two suggestions:
1) Add support for tab key so users don't have to type the entire file names
2) On initiation display the available commands or a brief intro text automatically, then let users dive deep into whatever they are interested in (help command works fine but it's a personal website so you would like to give people as much info as possible as fast as you can in the most original way.) It's a quite original idea.
It’s hard to make a shell that works like a real shell. Make it a shell from a parallel universe instead, or something more like a text adventure game, or a REPL in a context specific to your home page.
A weird aavshr command prompt for probing your inner mind. ADB: aavshr debug bridge. The visitor has just interrupted execution in a novel lisp that runs in your head and can inspect current state and run a handful of functions.
Something less familiar than a shell will give you more freedom to be really weird. REPLs are all the rage and a lot more flexible. Good luck!
This is cool. My personal website (https://iamlocaljo.com/) is visually a terminal, though it doesn't support ls, cat, etc and only has commands for page names. Maybe I should add support for ls, cat and other typical shell commands. Good idea.
Very cool! Add some “directory” as sections to your website, so people would “cd” into them to see the various sections (with probably index.html as a default MOTD?). There is also a mini bug when one lists the directory with “-l”: the filenames come right next to permissions. Just add a space in between. Great job!
It's really hard to use I would say. No completion, no history. You need to click directly over the input. It's nice exercise to create Terminal from scratch, but I don't understand why people don't use jQuery Terminal. Maybe they are afraid that it have jQuery in the name.
I tried `curl` and `wget` before finding the `help` command. Kinda bummed out that tab completion doesn't work. And neither does `ls -la`. Also make it so I can click anywhere to get my cursor back on the right line for typing.
Cool idea, though I kept experiencing something akin to the uncanny valley, where it was "close enough" to a shell that it really bothered me that it didn't work as expected :)
Eg I immediately tried to use tab-completion (as have many others) only to land in the URL field. Then I tried to use "less" to read the file, only to have that not work. Finally had to look up the help.
I guess the UX lesson here is if you're going to emulate a really familiar interface, you have to do it fully or otherwise people's muscle memory is going to lead them astray.
I've done a similar thing few years ago. You can check it out at the bottom of the website at http://126.96.36.199/ (website is old and needs updating, same with the domain). I decided to print the output to the alert popup. I have `clear` and `exit` implemented, and going up/down the command history.
That's pretty cool. I'm working on a text adventure and I end up creating a "shell" as well. One thing I did that I liked very much is auto complete and history. I think it would aggregate a lot to your website as well. Great job!
I love the idea, but there are a few UX issues which area rather annoying. One such issue is that the <input /> loses focus rather easily, like with as hitting the TAB key. The other thing which I find suboptimal is that the input does not get focus when I click on the "terminal".
If I use the shell, I expect to be able to type whenever the pane receives focus.
Another non-technical thing is that as a non-tech user I would be lost, since there's no indication of what to do on the page, a little hint in form of a MOTD would be a nice touch to round it up.
thanks for the suggestions! Yes, the input not focusing is very annoying and other people have also pointed it out in this thread. Will definitely fix that. Also agree about the second point, will probably display help first on load.
Love this idea. I’ve used a shell-like Hugo theme for my personal website, which at least preserves readability when JS is disabled. At this point, I wonder if you shouldn’t just plug a real shell to the website instead of faking one.
I don't understand why this has reached HN frontpage, sorry.
There are thousand of weird, demoscene, experimental sites and this one in particular is dull. Dull, dull, dull, dull, dull (as a monty python's reference)
Come on, you cannot infer that the author has "very limited experience with shells" from an incomplete (early!) implementation. Read the rest of the thread anyway, you'll understand that you are mistaken very fast.
Neat (if not that original) idea and side project, but I hope you know that not too many people will take the plunge to extract info out of something like this. About sites should be about easy showcases. This approach would be better for an online utility/tool.
hi thanks for the suggestion. I thought about this but decided against it as:
1. It's slower, I want to emulate the speed of running a shell in your local machine
2. I don't need all the nix shell features since it's a personal website. I can add features that only seem necessary for what I want to tell others about myself.
No command history, no tab completion. One assumes that "shell" is aspirational rather than descriptive. It's an interesting idea, but if you present what appears to be a shell interface to users expecting a shell interface, they're going to wander away pretty quickly after discovering it's merely facade. I wish you luck, but this isn't really ready for visitors yet.
It is totally ready for visitors. I visited, I enjoyed it. Doesn’t seem particularly wise to advise people something isn’t ready for people to visit, when those visitors are the only ones who can actually give useful feedback.
One hopes that the author didn't need me, a stranger, to tell them that this site is missing most of the fundamental features of a shell. Feedback is valuable, but strangers aren't going to visit something that clearly doesn't work a second time to see if they're making progress. There is a reason that early testing and feedback on prototypes is limited to in-house or pre-existing customer review. The author is entitled, and even encouraged, to ignore me--but my feedback is that they should have waited until they were closer to their goal and general feedback would be more valuable than hundreds of copies of "it doesn't work".
ksh93 supports both completion and history. I lost interest in looking before uncovering information about versions of ksh more than thirty years old, but neither feature is mentioned in descriptions of differences between ksh93 and predecessors, so I suspect the feature has been there for longer. Posix compliance is neither necessary nor sufficient for a reasonable colloquial definition of "shell."
hi thanks for the input, yes it is very early and I just posted this mainly for validation; I wanted to know if only I thought this was cool or if others also saw it as something fun. I did not anticipate so many people using this. I plan to implement most of the expected shell features soon.
I think you’re being overly critical of someone’s hobby project. This isn’t an enterprise app. It’s a fun little thing they made and wanted to share with us. If this is how the community reacts to what is really barely a hobby project it doesn’t surprise me at all that devs are burnt out from supporting OSS projects that probably have 1000s of ppl like you that complain and expect the world for free.