{"id":13593045,"url":"https://github.com/Ink230/DirectoryPredictor","last_synced_at":"2025-04-09T02:32:07.162Z","repository":{"id":143872569,"uuid":"587923191","full_name":"Ink230/DirectoryPredictor","owner":"Ink230","description":"PowerShell Module which displays related files, actively from the current directory, in your PSReadLine autocompletion list.","archived":false,"fork":false,"pushed_at":"2024-12-06T15:05:05.000Z","size":71,"stargazers_count":21,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-06T16:24:07.788Z","etag":null,"topics":["csharp","dotnet","module","powershell"],"latest_commit_sha":null,"homepage":"https://www.powershellgallery.com/packages/DirectoryPredictor/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ink230.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-11T22:43:00.000Z","updated_at":"2024-12-06T15:05:09.000Z","dependencies_parsed_at":"2024-01-13T16:22:42.786Z","dependency_job_id":"58af1a13-3777-428e-ac6c-8b246bc8e8cc","html_url":"https://github.com/Ink230/DirectoryPredictor","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ink230%2FDirectoryPredictor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ink230%2FDirectoryPredictor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ink230%2FDirectoryPredictor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ink230%2FDirectoryPredictor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ink230","download_url":"https://codeload.github.com/Ink230/DirectoryPredictor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247965632,"owners_count":21025409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","dotnet","module","powershell"],"created_at":"2024-08-01T16:01:16.023Z","updated_at":"2025-04-09T02:32:07.156Z","avatar_url":"https://github.com/Ink230.png","language":"C#","funding_links":[],"categories":["C\\#","C#"],"sub_categories":[],"readme":"### \u003cp align=\"center\"\u003e⚠️ EXPERIMENTAL IMPLEMENTATIONS ⚠️\u003c/p\u003e\n\n# Directory Predictor\n\nThe Directory Predictor permits live directory file lookups for PSReadLine's auto-complete functionality. \n\nhttps://user-images.githubusercontent.com/29797557/212500726-26f98466-dd21-46e1-b793-a08c803e2c23.mp4\n\n\n**Features include...**\n- Pattern matching support (?, \\*, |)\n- Search files, folders, or both\n- Hide or show file extensions\n- Search by file extension\n- Ignore specific commands\n- Sort results by files or folders\n- Limit the number of results\n\n# Installation\n\n### PowerShell via [PSGallery](https://www.powershellgallery.com/packages/DirectoryPredictor/)\n\n```Install-Module -Name DirectoryPredictor```\n\nIn your $profile add\n\n```Import-Module DirectoryPredictor```\n\n### Filepath .dll\n\nDownload the relevant .dll release and place where desired. In your $profile\n\n```Import-Module 'path\\to\\folder\\DirectoryPredictor.dll'```\n\n### PowerShell Configurations\n\n1. Add the following to your $profile\n\n   ```Enable-ExperimentalFeature PSSubsystemPluginModel```\n\n2. Check experimental features are enabled\n   \n   ```Get-PSSubsystem -Kind CommandPredictor```\n\n3. In $profile again\n   \n   ```Set-PSReadLineOption -PredictionSource HistoryAndPlugin```\n\n4. Restart or reload\n\n5. Check the module is installed\n   \n   ```Get-PSSubsystem -Kind CommandPredictor```\n\n6. Test by typing in a directory\n   \n   ```\u003csomecmd\u003e \u003cany letter or word\u003e```\n\n# Configuration\n\n### FileExtensions\nDetermine if file extensions should show or not in the prediction and in the autocomplete result.\n  \n```Set-DirectoryPredictorOption -FileExtensions \u003cstring\u003e [Include | Exclude]```\n\n### DirectoryMode\nSearch for files, folders, or both.\n  \n```Set-DirectoryPredictorOption -DirectoryMode \u003cstring\u003e [Files | Folders | Mixed]```\n\n### SortMixedResults\nSort your results by Files or by Folders first.\n  \n```Set-DirectoryPredictorOption -SortMixedResults \u003cstring\u003e [Files | Folders]```\n\n### ExtensionMode\nSearch file extensions. Does not work with -DirectoryMode Folders.\n  \n```Set-DirectoryPredictorOption -ExtensionMode \u003cstring\u003e [Enabled | Disabled]```\n\n### ResultsLimit\nSpecify how many results, from 1 to 10, to display. 10 is a current limit by PSReadLine but the module will accept up to 500 currently.\n\n```Set-DirectoryPredictorOption -ResultsLimit \u003cint\u003e [1-10]```\n\n### IgnoreCommands\nIgnore specific commands in a comma separated string. This will cause those commands to not display [Directory] suggestions.\n\n```Set-DirectoryPredictorOption -IgnoreCommands \u003cstring\u003e [comma separated list]```\n\n### Pattern Matching\nYou have 3 pattern matching operators.\n\n- ? : Search anything that is available to be searched from the above cmdlet options\n- \\* : Wildcard search. Before, after, or both.\n- | : OR pattern search. Search for results that match any number of the patterns provided. Supports multiple | operators.\n\n- Ex:\n```ls 't|p``` or ```ls '*et|*pl``` or ```ls *ing``` or ```ls ?```\n  - *Note the ' or \" is only required for multiple patterns*\n\n### Tips\n* Each of these flags work great with aliases for fast on the fly adjustments\n* Example\n  ```\n   Function ShowExtensions5 {\n      Set-DirectoryPredictorOption -FileExtensions Include\n   }\n   Set-Alias -Name se -Value ShowExtensions\n\n   Function HideExtensions {\n   Set-DirectoryPredictorOption -FileExtensions Exclude\n   }\n   Set-Alias -Name he -Value HideExtensions\n   ```\n\n* You can disable the regular history results and only use the plugin with\n  \n  ```Set-PSReadLineOption -PredictionSource Plugin```\n\n# Behaviour\n\n- All symbols but spaces are respected\n- Only the last word is used to search but previous input is respected\n  - ```code -n hel``` will work and will match \"hel\" to filenames\n- Commands are ignored and no searching will display with just a command\n- Accepted completions are saved to the regular history at this time\n- Check the intro gif above for more insight\n\n# Roadmap\n\nAs of v0.0.5, the plan is to gather even more user suggestions!\n\nIf you have an idea, suggestion or want to contribute, please open an Issue!\n\n# Disclaimers\n\n1. This is dabbling in ExperimentalFeatures that come with a warning of *breaking changes* or *unexpected behaviour*.\n\n2. The intended purpose of PSReadLine predictive plugins are to be predictive. This predictor does not predict anything.\n\n# Credit / Resources\n### [PSReadLine Github](https://github.com/PowerShell/PSReadLine)\n\n### [CompletionPredictor Github](https://github.com/PowerShell/CompletionPredictor)\n\n### [Microsoft Docs - Creating a Cmdlet](https://learn.microsoft.com/en-us/powershell/scripting/developer/cmdlet/creating-a-cmdlet-to-access-a-data-store?view=powershell-7.3)\n\n### [Basic PSReadLine Configurations](https://jdhitsolutions.com/blog/powershell/8969/powershell-predicting-with-style/)\n\n### [PowerShell - Experimental Features](https://learn.microsoft.com/en-us/powershell/scripting/learn/experimental-features?view=powershell-7.3)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FInk230%2FDirectoryPredictor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FInk230%2FDirectoryPredictor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FInk230%2FDirectoryPredictor/lists"}