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
Allow REPL command aliasing #769
Conversation
👍 nice one! I think when I raised the issue I had in mind not only an alias command but also some kind of persistent aliasing. Unfortunately I didn't write out details 😒. I guess such a thing would have to live somewhere like .opts or app.config. |
Let's hold this for post 0.10 On Wed, Jun 18, 2014 at 2:35 PM, Adam Ralph notifications@github.com
|
👍 @adamralph persistent aliasing would be a good use case for a global opts file |
can anyone look at that now? |
@@ -28,14 +28,14 @@ public class Repl : ScriptExecutor | |||
_scriptArgs = scriptArgs; | |||
_serializer = serializer; | |||
Console = console; | |||
Commands = replCommands != null ? replCommands.ToList() : new List<IReplCommand>(); | |||
Commands = replCommands != null && replCommands.Any(x => x.CommandName != null) ? replCommands.Where(x => x.CommandName != null).ToDictionary(x => x.CommandName, x => x) : new Dictionary<string, IReplCommand>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
&& replCommands.Any(x => x.CommandName != null)
is made redundant by the Where()
@filipw any opinion on my comment above regarding |
sorry I somehow missed it. yeah indexer is a better idea |
@filipw please assign back to me after that change has been added |
done |
👌 |
Fixes #730
You can now do:
:alias "install" "i"
In this case the new command is
:i
and you can use it as you would:install
. Aliasing is implemented as another REPL command too.This can obviously wait for the merge until the DEV branch accepts PRs again.