Wow. I figured my last post was discussion-provoking, but I didn't expect THAT many responses. Thanks for all the
pep-talk, it helps a lot to know how many people out there are interested in this project and it's success. During the cold and dark winter months, especially in December, it's easy to become depressed and start to question whether what one's doing is actually worth doing it. Facing the risk of having net/power connections being cut at any moment due to unpaid bills doesn't help much either. Still, such feedback gives some will and strength to continue, even when all else fails. So once again, thanks.
So, to address the main concern of the previous post, namely hnshell usability issue, I introduced the following syntax for calling module-specific commands:
<module> <command> <args>. Thus, to list ed2k servers, you can now type
ed2k list, to connect to a specific server, use
ed2k co Raz or
ed2k connect 195. Current status can also be seen via
ed2k stat command. Thus:
madcat@hnsh:/$ ed2k l
[ 62.241.53.2:4242] 62.241.53.2:4242 Users: 444599 Files: 68192278
[ 64.34.162.148:5661] 64.34.162.148:5661 Users: 464923 Files: 36730543
[ 64.34.165.203:5306] Byte Devils Users: 532885 Files: 42099162
[ 195.245.244.243:4661] Razorback 2.0 Users: 1149180 Files: 164707448
madcat@hnsh/$ ed2k co Raz
eDonkey2000: Connecting to 195.245.244.243:4661
madcat@hnsh/$ ed2k s
eDonkey2000 network: 21648098 users online, sharing 2336502348 files.
Connected to server: [195.245.244.243:4661] Razorback 2.0 with High ID (3357049682)
1149210 users and 164961582 files online on current server.
madcat@hnsh/$ q
Connection closed by foreign host.
This system is internally still based on the object hierarchy (and the old commands still work as before), but I added some wrapper-functions on top of it to get the better syntax. For example, ftp module (if it was finished) could be used with the following commands:
$ ftp co user:password@hydranode.com
$ ftp list
$ ftp get latest-binary.exe
$ ftp disc
All sub-commands, as well as the module-name, can be abbreviated as long as there is no ambiguity. Hence
ed c R and
ed s also work (the latter is short-hand for "ed2k stat").
Core library also used that context-sensitive stuff for one thing - sharing folders, so now I added a separate
'share' command to replace that. The syntax is same as the former 'adddir' command in files/ subdir, e.g.
share <dir> (-r).
As a side-note, commands 'ed2k' and 'share' introduced ambiguity with one-character shorthands of 'exit' and 'shutdown' commands. While with the former, you can use the 'q' shorthand (of 'quit'), 'shutdown' command now requires at least 'sh' being entered. Can't have the cake and eat it too :)
Madcat, ZzZz