Show HN: My personal website is a shell
aava.sh
aava.sh
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.
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.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.
sh: run an executable file ./cowsay covfefeSo here's my suggestion: add some text adventure games. Use emscriptem to convert frotz or something similar to javascript.
Stupid nerds that felt mislead and needed to express disdain that 'personal website' and 'shell' isn't useable as a full shell to hax0r on. smh
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!
guest@sif~% sudo rm -rf /
Command not found : 'sudo'. Type 'help' for available commands.
Oh well, it was worth a try :) <input type="text" autocapitalize="off />[NEXT] [PREVIOUS] [RANDOM]
tl;dr: it appends text from a file to a div, pausing on a specific delimiter.
I only use Github pages for a development testbed, my "deploy" is an FTP copy to my personal web server.
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.
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[1] JS/UIX (2003) https://www.masswerk.at/jsuix/
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.
Don't get me wrong, cool technical idea.
Here is advanced example that use real like commands with Pipe operator (from Bash). With figlet, lolcat and cowsay commands that can be mixed: https://codepen.io/jcubic/pen/vYLvvXx
You can glue pretty advanced website just collecting examples from https://terminal.jcubic.pl/examples.php
With jQuery terminal you only need to care about the commands. Note that the library is more like a framework.
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"?
I'd wager you could actually put a real linux shell in your website with that!
Browser is the new cool!
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.
Loved the product that you are working on
Amazing website though, liked the idea
cat about.txt | cowsayFor most websites; there's no reason for JS. For something like this? That's just being a prick about JS for being a prick about JS's sake.
I agree that a fallback website when JS is disabled (with complete relevant content) would be good (progressive enhancement), with a hint that one may want to try enabling Javascript for fun.
auto-complete doesn't work also (<tab>)
est@sif
~
%
elp
mmand not found : 'elp'. Type
elp' for available commands.
est@sif
~
%you need to expand on this... I'd buy a series of .sh domains just to use this.
isolate the system calls with some sort of sandboxed technology so you can provide a real unix experience.
If you click anyway, you can no longer type.
I'd look at the comment above as complement, now you know what not to do (:
This is the exact opposite of useful feedback. I hope you realise project that is literally intended for fun...
Easy access to command history and tab completion are certainly niceties that came along at some point, but are in no way part of the definition of a shell.
I believe it does log a short set of command history to a file, but it'd not available with, say, the up arrow.
In general, though, I don't think any form of history is required by the POSIX shell standard, and tab-completion definitely isn't.