-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
«cd -» and tab completion for external programs? #45
Comments
I'm not sure what you mean by “tab completion for external programs”. Do you mean completion for the name of a program, or custom completion for flags and such dependent on the program? I haven't made the completer function visible to users, and I probably should, in which case you could easily have the former. But completion is currently very limited to the point where you might not want to add it. Right now the completion function only receives the current word under the cursor -- it gets no context to know if it's completing a command name, a file name, etc. So any different completions you run would have to run together. I want to fix this in general by using a new line editor, such as making a line-editor mode for remacs or rmacs, perhaps. Better completion and line editing is definitely on my radar, though I can't say how soon I'll actually get there. As for «cd -», FYI you could make your own -- here's a simple sketch:
Then |
I mean, for example, that typing «em» and TAB should give «emacs». Your example doesn't work :/ |
Are you using |
Ok, I've just pushed a commit that adds optional command completion, and I'm going to explain how to turn it on here. The default completion from now until I replace readline will be path completion. But you can use optional command or racket function completion by doing the following (in your rashrc file):
But really just paths is probably what you want until a completer can get some context for what sort of thing it should be completing, or at least an ability to add multiple completion keybindings. I don't think I'm going to put this in the real docs, because I want to replace it ASAP, and I don't think it's really very useful. Maybe early next year I'll have some time to make a line-editor interface for |
Hi @willghatch, have you had time to improve this since the last message? Rash looks awesome but (to me) it's not really usable without at least some basic completion. Is there any way I can help? (mind you, I'm not a Scheme dev, just find it very appealing). |
On Thu, Jun 27, 2019 at 02:58:16AM -0700, Ricardo Correa wrote:
Hi @willghatch, have you had time to improve this since the last message? Rash looks awesome but (to me) it's not really usable without at least some basic completion. Is there any way I can help? (mind you, I'm not a Scheme dev, just find it very appealing).
Sorry, I'm afraid I haven't. My PhD advisor advises me that making a
line editor for Rash should be “my first side-project *after*
graduating”. And I'm inclined to to agree with him. So I'll
definitely do this eventually, but probably not this year.
If you want to make a line editor or a better FFI module for
libreadline, feel free! But I don't think there will be any serious
progress on completion until Rash has a better line editor.
So for the time being Rash will probably remain mostly usable for
scripting, unfortunately.
|
No description provided.
The text was updated successfully, but these errors were encountered: