Skip to content

georgebrock/readline-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Readline example

Example code for a series of blog post introducing tab completion in GNU Readline.

For more, see the blog posts:

Running the C code

Compile and run the code with:

make
./rdemo

The defaults in the Makefile are set up for an OS X system with Readline installed via homebrew to /usr/local/opt. You can override these settings with the appropriate values for your system by setting the CC, CFLAGS and LDFLAGS environment variables (see the Makefile for example values).

Running the Ruby code

The Ruby version demonstrates two Ruby patches that need to be applied before the code will run:

At the time of writing, #12659 is already in trunk and the 2.4 preview builds. #13050 hasn't been accepted yet, but may make it before 2.4 final.

Once you have a properly patched version of Ruby, you can run:

ruby main.rb

About

Readline tab completion example for a blog post

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published