Patches: Browse | Submit New | Admin

[#5555] Readline.completion_with_context_proc = returns current text and full line

Date:
2006-08-29 03:55
Priority:
3
Submitted By:
Eero Saynatkari (esaynatkari)
Assigned To:
Akinori MUSHA (knu)
Category:
Files / Dirs / IO
State:
Open
Summary:
Readline.completion_with_context_proc = returns current text and full line

Detailed description
Currently the completion_proc given to Readline gets one
parameter only, the 'current word' being completed. On
occasion, it is useful to be able to see the entire 
line of input. Currently the only workaround is to
hack basic_word_break_characters to something non-
printable. The patch provides two new methods:

 Readline.completion_with_context_proc=
 Readline.completion_with_context_proc

This patch is backwards-compatibile while providing new 
functionality. Usage is identical to current.

Usage example:

 require 'readline'

 Readline.completion_with_context_proc = lambda {|word, line| # ...}

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
rl.patch Readline patch to allow completion based on complete line Download

Changes:

Field Old Value Date By
assigned_tonone2007-06-13 06:28zenspider
category_idMisc / Other Standard Library2007-05-30 04:25zenspider
category_idCrypto / Digest / Compression2007-05-30 03:50zenspider
artifact_group_idNone2007-05-30 03:41zenspider
File Added773: rl.patch2006-08-29 03:56esaynatkari