From: Bill Atkins Date: 2005-08-12T00:00:16+09:00 Subject: Re: Ruby readline - completion based on already-entered commands I do. I have the basics of readline working; I'm just trying to figure out how to complete input differently based on already entered commands. An analogy would be shell completion. You type "mpla [TAB]" and "mplayer" gets completed, but any subsequent completion is for paths only. On 8/11/05, James Edward Gray II wrote: > On Aug 11, 2005, at 9:44 AM, Bill Atkins wrote: > > > How can I use the builtin readline library to complete arguments to > > commands? I have basic completion working now, so that > > > > %wmi > st [TAB] > > > > will show valid commands starting with "st" (in this case "start" and > > "stop"), but how do I complete arguments specific to that command? > > Do you have a Pickaxe (second edition)? It's demoed on the page for > the Readline library. > > Let me know if you don't and I'll post an example... > > James Edward Gray II > > > -- Bill Atkins