174 comments

[ 2.4 ms ] story [ 192 ms ] thread
The website is not mobile-friendly (as of yet)

  est@sif
  ~
  %
  elp
  mmand not found : 'elp'. Type
  elp' for available commands.
  est@sif
  ~
  %
This if fun, few suggestions.

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 did the exact same thing and assumed I was seeing some strange behaviour on mobile, until I came here.
Yes, especially since cowsay was marked in a different color!

Expected behaviour from *nix would be that you'd either

  sh somescript.sh
Or

  ./someexecutable
Of course the extension is not technically required, but it would help in the UX for the user to try running it on the sh command.
I personally think this is the best solution besides implementing ‘./‘: take the colouring off and simply return “permission denied” when someone tries to ‘chmod’
As "cat cowsay" tells me that cowsay is an executable, I wouldn't expect "sh cowsay" to work in any event.
If you type "help", it says:

    sh: run an executable file
Yeah, I saw that after, but since it looks like a Unix shell, my first reaction is to just use typical Unix commands.
hi thanks for the suggestion.

Yes, I plan to implement './' which is the expected behavior for running executables. I also plan to implement 'cd' and organize the content into nix style directories.

I kept trying `./cowsaydo-not-run-me` because `ls` outputs with no separators (`ls -l` fixed me up)
Same here on mobile (iPhone 7)
Same here, ls output needs formatting help on mobile. I was hoping glob might work too - could be a useful update
I implemented './' and it should be live now.
This "just worked" for me. Nice work
Also I was wondering what 'do-not-run-me' would be so my first try was 'file do-not-run-me', but alas, that command didn't exist.
It seems to work now.

    ./cowsay covfefe
Once I couldn't figure out how to run it, I typed help and it showed me way to do. Seemed pretty intuitive
Add tab support, how can you make me type out full commands?! :)
will do, I plan to implement all the expected unix shell features, thanks for the suggestion!
Please also add "arrow up" to repeat the last command :)
hello, thanks for the input. Yeah, implementing history is next in line :D
the site is so 'shell' like, this actually confused me that it didn't work. that's a compliment on how i had already bought into this being a shell.
If you want some inspiration, have a look at https://replit.com/site/careers. I believe they're running a docker container, which gives you the full bash experience!
(comment deleted)
I've enjoyed working on similar projects, they are fun.

A small usability suggestion, since your whole page is a shell and the input field isn't well visually defined, I would make clicking nearly anywhere give focus to the input field.

Hi, thanks for the suggestion. Yeah, this definitely is very annoying when the input isn't focused when you click elsewhere.
Awesome, did you get a chance to check out the out-of-the-box-thinkers at https://replit.com/site/careers? The original application of the idea aS A full-fledged hiring shell.

Browser is the new cool!

Many keyboard shortcuts I rely on in a shell is hijacked by browser. So sad
Command not found : './do-not-run-me'. Type 'help' for available commands.

auto-complete doesn't work also (<tab>)

hello yes sorry, './' and auto-completion don't work as of yet. The website is still early, I plan to implement most of the expected unix shell features soon.
Your site looks nice, but these 2 would drastically increase usability for me
Such a great idea! I'd personally consider using busybox in WASM instead of reimplementing a shell. Quick Google search found [1]. Have you considered that?

[1] https://tbfleming.github.io/em-shell/

hello, thank you for the pointer. Will definitely look at it.

  guest@sif ~ % vi about.txt
  Command not found : 'vi'. Type 'help' for available commands.
Very cool site. Looks great! It felt so much like a console that I tried to tab for auto-complete! (^_^)b
Thank you. Yes, I just implemented this over the last two weekends and is very early. I plan to implement all the other fun *nix shell features.
This reminds me the HTML5 terminal component, which didn't get much attention. I've used it for some API works and is indeed useful / cool
A neat side-effect (unintended?) is when I hit ^d to exit the shell (almost by reflex), the bookmark add got triggered on Chrome
Yeah, the website is very early and I just implemented basic commands. I plan to implement keyboard shortcuts, history, and all other fun shell stuff.
I’d say keep that one. It’s a fun little bit of meta
There isn't one to keep, its just keyboard shortcut in chrome(??)
He means, don't override it to give it its normal shell meaning, as the current meaning (add bookmark) is pretty desirable for him as owner of the site.
Neat! Though I would recommend making clicking anywhere on the screen focus the text input.
And... I got rickrolled. Well played.
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.
Nice and fun. I would use it as website to give to recruiters. I would have saved a lot of time this way.
cowsay and do-not-run-me are up against each together in the ls when I check in safari, i.e. it's not obvious that they're separate commands.
ah thanks for the info, I need to fix it for safari and mobile!
Interesting bit of Javascript. Fun.

In the code that handles the long form of ls, I'd suggest ensuring spaces between "file perms" and "file names": Safari gloms them together.

Not sure why "sh" is needed to "run" things, since items are encoded as objects: Why not for...in and if not found "command not found"?

thanks for the suggestions. Yeah, I used 'sh' just for now as a basic command, I plan to implement all the expected nix shell features.
Reminds me of https://bellard.org/jslinux/vm.html?cpu=riscv64&url=buildroo...

I'd wager you could actually put a real linux shell in your website with that!

You are evil!!! I've just rick-rolled myself :D
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.
Also consider auto focusing the field when the page loads
thanks for the input, yes definitely planning to do this
If you do, please check the various meta keys. Hijacking tab is expected here, but not cmd-/alt-tab etc.
nice! this is a fun project so I ma glad you are wanting to go further with it.
I agree, hijacking is good when it leads to the expected user behaviour. I kept pressing tab to auto-complete the command, but the cursor jumped to the address bar.
I kept pressing up to retrieve my last command.
There we go, I opened this thread with two things in mind that immediately struck me - tab completion and pressing up for previous command and those two are the top comments!
I am in ok with hijacking tab in general. The fact that tab doesn't act as a tab key in text areas is one of the most annoying things about the web.
I immediately tripped on the autocomplete issue. Still, a super neat thing.
I've been surreptitiously rick-rolled by myself ... funny but kind of evil at the same time ;-)