Daft Shell Code
Status: Pre-Alpha
Brought to you by:
danthedeckie
__ ___ __ __ ___ ___ /\ \ /'___\/\ \__ /\ \ /\_ \ /\_ \ \_\ \ __ /\ \__/\ \ ,_\ ____\ \ \___ __\//\ \ \//\ \ /'_` \ /'__`\ \ \ ,__\\ \ \/ /',__\\ \ _ `\ /'__`\\ \ \ \ \ \ /\ \L\ \/\ \L\.\_\ \ \_/ \ \ \_ /\__, `\\ \ \ \ \/\ __/ \_\ \_ \_\ \_ \ \___,_\ \__/.\_\\ \_\ \ \__\ \/\____/ \ \_\ \_\ \____\/\____\/\____\ \/__,_ /\/__/\/_/ \/_/ \/__/ \/___/ \/_/\/_/\/____/\/____/\/____/ ALPHA 0.1 by Daniel Fairhead ============ = Concept: = ============ The commandline interface is one of the most powerful computing tools today. BUT, also with one of the highest learning curves to doing really powerful things. So many different -flags --options and so on. Even if you argue that they aren't "so" bad - they still have inherited so many anachronisms and cludges from older systems that there is no standard interface, and idiosyncracies. Daft Shell aims to bring simple english-like grammar to the commandline, whilst not sacrificing power. instead of typing: grep -l TODO *.txt | xargs -n 1 -J % cp % /home/daniel/calandar/jobs you could type copy all .txt files containing TODO to jobs in my calandar or how about send all pictures bigger than 5m to resize 1024x768 This is the shell your granny could learn to use. ... OK. Well, maybe not your granny. But say you have a server which you (the super sysop administrator über-coder) and the web-design monkey are working on. You can use CSH and vi, but when you're busy, the web-monkey still needs to be able to move files around and be reasonably productive. The Daft Shell should be able to make things a bit easier. Although giving him a decent graphical ftp client may also work... =================== = Getting Started = =================== python daftshell.py gives you the MOST basic interface ever. python daftshell_curses.py gives you the "real" curses gui (WIP). =========== = Grammar = =========== The aim is to be as english-like as possible. Unfortunately english has a lot of extra verbosity, which we have to deal with. We also need to be able to work without it, so as to allow quick working for advanced users $ s *.jpg > 5m resize 1024x768 is shorthand for $ send all .jpg files bigger than 5 megabytes to resize 1024x768 for instance. basic commands take instructions, and instructions take values. command - instruction - variable - variable - instruction - variable - instruction - variable for instance $ copy apples from tree to basket copy - from % tree - to % basket % apples and from and to can be in any order you wish. $ copy to basket apples from tree $ copy apples from tree to basket $ copy to basket from tree apples however if some words are left out (for brevity) then there is a "default" order which is followed. One interesting idea would be an algorithm that learned what order you normally put options in... but not for now. You could end up with very personalised machines, totally unoperable by others. $ copy tree/apples to basket $ cp tree/apples basket all of these should execute exactly the same. Some people think in weird ways, so we should be able to cope. We also can cope with "and". $ move apples and pears from basket and bag to pie and a few pronouns wouldn't be a bad idea. $ copy apples to thumbnails and resize them to 640x480 you could argue that you don't need pronouns: $ cp apples thumbnails and resize 640x480 is still reasonably comprehensable and unambiguous. it would be nice if that also worked. :-) The order isn't really important either: $to basket move all apples ========== = Note!! = ========== simple_alias (aka, "means") command allows simple aliasing of commands. so e can mean 'echo', etc. NOTE that you should fold command names that you point at in '' quotes. $ simple_alias means 'simple_alias' $ alias means 'simple_alias' etc. -------------- README title made with http://www.network-science.de/ascii/