Rethinking the Command Line

John Samuel

Capitole du Libre 2017, Toulouse, 19th November, 2017

Creative Commons License
I do programming
I teach programming
I regularly use command line
Simplify command line
$ ls : list files
$ touch : create a blank file
$ mkdir : create a directory
$ cd : change a directory
$ ps : list processes
$ top : list processes
$ netstat : list network connections
$ lshw : list hardware
$ lscpu : display information about cpu architecure
$ date : display or set date
ls: list files
touch: create blank file
mkdir: create a directory
cd: change a directory
ps: list processes
top: list processes
netstat: list network connections
lshw: list hardware
lscpu: display information about cpu architecture
date: print or set date
Options : What about them?
-v : Is it verbose or is it version?
-r : Is it reverse or is it recursive?
help : Is it -h or is it --h? Is it -help?
Why not multilingual commands and options?
Support from standard libraries
C: getopt(), getopt_long()
Python: argparse()
C: getopt(), getopt_long()
  • short and long options
  • optional arguments
Python: argparse()
  • short and long options
  • one or more optional arguments
  • specify data types of arguments
  • help messages
  • subcommands
Benefits: Support from standard libraries
Future: Support from standard libraries
Incorporate colors
Add progress
3. Inspiration from other domains
  1. Create C
  2. Read R
  3. Update U
  4. Delete D
  5. List L
Firefox Ubiquity
Multilingual: actions + resources
create resource
read resource
update resource
delete resource
list resource
(action)... resource
créer resource
afficher resource
modifier resource
supprimer resource
lister resource
(action)... resource
list resource --count 10 --order desc
Multilingual: actions + resources + options
Why not let users create aliases ?
Why not let users decide colors for the actions, resources and options?
How will user documentation look like?
$ .
$ .
  1. Learning curve
  2. Open source
  3. Linguistic Diversity
$ .
  4. FEATURE: The linguistic command line, Aza Raskin, Interactions - Toward a model of innovation, Volume 15 Issue 1, January + February 2008, Pages 19-22
  5. Ubiquity: Designing a Multilingual Natural Language Interface, Michael Yoshitaka Erlewine, SIGIR Workshop on Information Access in a Multilingual World, July 23, 2009
$ .