Skip to content
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

Module does not seem to play well with Solarized #41

Open
pmcevoy opened this issue Aug 24, 2018 · 1 comment
Open

Module does not seem to play well with Solarized #41

pmcevoy opened this issue Aug 24, 2018 · 1 comment

Comments

@pmcevoy
Copy link

pmcevoy commented Aug 24, 2018

I'm using the Solarized powershell prompt and have installed as per https://github.com/neilpa/cmd-colors-solarized

It seems that script (can't call it a module) sets up $global:options for it's own purposes and this breaks the usage in TabExpansion.ps1 on line 176 to the effect that when Import-Module RabbitMqTools I get a whole bunch of these errors:

Cannot index into a null array.
At C:\Program Files\WindowsPowerShell\Modules\RabbitMQTools\1.5\ScriptsToProcess\TabExpansions.ps1:178 char:1
+ $global:options['CustomArgumentCompleters']['Test1:Name'] = $testComp ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

I've tried to workaround by adding more conditional checks in the assignment, but I'm unfamiliar with the PSConsoleReadlineOptions class and purpose, and I can't add a property to it like a normal hashtable.

Pete

@pmcevoy
Copy link
Author

pmcevoy commented Aug 24, 2018

In my above, it seems that Solarized assigns PSConsoleReadLineOptions to global:options. I've changed your TabExpansion.ps1 with a search/replace of global:options with global:rabbitOptions and I think that is working (I hate global variables but I think in this case it's only use so as to pass extra options t to the tabexpansion2 re-write on line 277

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant