jovanbulck / jsh

A basic UNIX shell implementation in C
GNU General Public License v3.0
30 stars 10 forks source link

Put your application-specific autocompletion ideas here #44

Open GijsTimmers opened 9 years ago

GijsTimmers commented 9 years ago
jovanbulck commented 9 years ago

apt support done --> see branch pacman support is on the way :p

jovanbulck commented 9 years ago

Status update:

Autocompletion in master

autocompletion support for built_ins, aliases and a number of predefined UNIX commands now in master + some custom completion for some UNIX commands: git, apt-get, make, jsh --> should be stable, report here if not

Writing custom autocompleters (developers, developers, developers)

Autocompletion functions ("generators") go into jsh-autocomplete.c. I documented this file quiet well, since I lost a lot of time trying to understand how readline works. Anyone who feels like adding autocompletion support for some (usefull) command => go ahead and open a pull request! Should't be too hard, as I wrote a friendly macro who does everything for you ;-) Check out some examples in jsh-autocomplete.c

Future work

for the autocompletion of UNIX command names: we should scan all directories in $PATH at startup-time and put all commands in an array for autocompletion. Currently only a hack: array with widely used UNIX commands