Add arguments to module for configuring promp hook and frequent folders#121
Open
stinos wants to merge 3 commits intovors:masterfrom
Open
Add arguments to module for configuring promp hook and frequent folders#121stinos wants to merge 3 commits intovors:masterfrom
stinos wants to merge 3 commits intovors:masterfrom
Conversation
Mention the directory needs to exist otherwise users are greeted with rather meaningless 'The system cannot find the path specified.' errors. Remove the instructions which hardcode the profile directory because they are incorrect for PowerShell Core and teaching users to use $PROFILE is better anyway. Mention the default directory used for PowerShell Core as well to make sure users know there are multiple locations.
Make the module consume arguments and use this to configure 2 things: - prompt hook: currently prompt registration only works if no other module also overrides the prompt function after importing the ZLocation module. Normally fine, but it can be more convenient for users to just define their own prompt and call Update-ZLocation in it - adding frequent folders: this is nice, but it can also be particularly slow (> 200mSec on an above-average machine) and is not always used
|
This implementation doesn't account for the ZLocation/ZLocation/ZLocation.psm1 Line 126 in d569d35
if ($ModuleArguments.RegisterPromptHook) {
Register-PromptHook
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main reason for this PR is (best of three for both cases, order doesn't matter):
but I think it's nice to have this configurable in general.