SourceForge.net Logo

AI Bash 0.2

Project Page.

Documentation

AI bash is an extension of the ordinary bash which tries to make the bash more intellegent. Since the code is based on the original bash (version 2.0.5) 99% of the code is not written by myself. So thank the programmers of the original bash for that fantastic software, which is also the reason that it was used for this project. The intelligence is based on the following items:

correcting typing errors of command names

this bash tries to correct incorrectly typed program names.
example emcs will be corrected to emacs

correcting typing errors while pressing TAB

this bash can correct typing errors while pressing TAB. It only assumes a typing error if no TAB match could be found. It corrects the following mistakes

missing characters

Assuming it exists a file called /home/heinz/daten/xy.dat /home/heinz/dten/xy will be corrected by pressing TAB to /home/heinz/daten/xy which will be processed by the original completing function afterwards

switched characters

/home/heinz/dtaen/xy will be corrected to /home/heinz/daten

wrong characters

/home/heinz/deten/xy will be corrected to /home/heinz/daten

capitalization errors

/hOme/heinz/daten/xy will be corrected to /home/heinz/daten/xy

missing home directory

daten/xy will be corrected to ~/daten/xy

learning which suffix is associated to which program

Therefore the program creates a file called ~/.aibash.config which contains the information how often a program was called with which suffix. I included my configuration file so you can save time for learning if you just copy it to your home directory. If the program is usually called with files of some special suffixes other files (except directories) are filtered out when pressing TAB. The suffixes of the programs are stored in the file

License

This program is released under the GNU General Public License Version 2 The extensions to the original bash were written by Tim vor der Brück

Installation

This program requires xerces for C++ (tested with xerces-c-src1_7_0) by the apache software foundation, a C++ compiler (e.g. g++) as well as the Standard Template Library (should be included in the c++-package). If you use a different c++-compiler than g++ you must replace g++ in the file ai-bash0.2/lib/readline/aibash/makefile by the name of the c++-compiler you used. Afterwards just switch to the directory ai-bash-0.2. Type ./configure
Type make
You can now start the AIBash just by typing ./bash or by doing the following:
Type make install (not tested yet)
Start the AIBash by typing bash. If you want to speed up the learning of suffix association just copy the file ai-bash0.2/lib/readline/aibash/aibash.config to your home directory. debug information can be turned on by setting the environment variable AB_DEBUG_OUTPUT to TRUE. Please inform me if you have trouble to get this program running!!

Learning algorithm

See aibash for informations about the learning algorithm and error correction

Comments

Although this program should already be fully usable (it prints some debug messages though) it is only an alpha version. So I plan to add additional features in the future. I hope this program will be useful. The extensions to the ordinary bash are made by Tim vor der Brück. Any comments to this project are welcome. Send those to brueck@dfki.de.