PSFzf
PSReadLine
PSFzf | PSReadLine | |
---|---|---|
5 | 15 | |
718 | 3,541 | |
- | 1.3% | |
6.8 | 7.6 | |
14 days ago | 4 days ago | |
PowerShell | C# | |
MIT License | BSD 2-clause "Simplified" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
PSFzf
-
Tools to achieve a 10x developer workflow on Windows
Sets up PSFzf: PowerShell wrapper for fzf, for fuzzy finding files and directories
- GitHub β kelleyma49/PSFzf: A PowerShell wrapper around the fuzzy finder fzf
-
8 tips for setting up PowerShell on Windows
# To make ZLocation module work in every PowerShell instance. Import-Module ZLocation # PSFzf has undocumented option to use fd executable for # file and directory searching. This enables that option. Set-PsFzfOption -EnableFd:$true # Custom function to SetLocation, because PSFzf uses # Get-ChildItem which doesn't use fd and doesn't use # ignore files. Invoke-FuzzySetLocation is defined here # https://github.com/kelleyma49/PSFzf/blob/b97263a30addd9a2c84a8603382c92e4e6de0eeb/PSFzf.Functions.ps1#L142 # # This implementation is for setting FileSystem location # and implementation uses parts of # https://github.com/kelleyma49/PSFzf/blob/b97263a30addd9a2c84a8603382c92e4e6de0eeb/PSFzf.Base.ps1#L20 # https://github.com/kelleyma49/PSFzf/blob/b97263a30addd9a2c84a8603382c92e4e6de0eeb/PSFzf.Base.ps1#L35 function Invoke-FuzzySetLocation2() { param($Directory = $null) if ($null -eq $Directory) { $Directory = $PWD.Path } $result = $null try { # Color output from fd to fzf if running in Windows Terminal $script:RunningInWindowsTerminal = [bool]($env:WT_Session) if ($script:RunningInWindowsTerminal) { $script:DefaultFileSystemFdCmd = "fd.exe --color always . {0}" } else { $script:DefaultFileSystemFdCmd = "fd.exe . {0}" } # Wrap $Directory in quotes if there is space (to be passed in fd) if ($Directory.Contains(' ')) { $strDir = """$Directory""" } else { $strDir = $Directory } # Call fd to get directory list and pass to fzf Invoke-Expression (($script:DefaultFileSystemFdCmd -f '--type directory {0} --max-depth 1') -f $strDir) | Invoke-Fzf | ForEach-Object { $result = $_ } } catch { } if ($null -ne $result) { Set-Location $result } } # Show tips about newly added commands function Get-Tips { $tips = @( [pscustomobject]@{ Command = 'fcd' Description = 'navigate to subdirectory' }, [pscustomobject]@{ Command = 'ALT+C' Description = 'navigate to deep subdirectory' }, [pscustomobject]@{ Command = 'z' Description = 'ZLocation' }, [pscustomobject]@{ Command = 'fz' Description = 'ZLocation through fzf' }, [pscustomobject]@{ Command = 'fe' Description = 'fuzzy edit file' }, [pscustomobject]@{ Command = 'fh' Description = 'fuzzy invoke command from history' }, [pscustomobject]@{ Command = 'fkill' Description = 'fuzzy stop process' }, [pscustomobject]@{ Command = 'fd' Description = 'find https://github.com/sharkdp/fd#how-to-use' }, [pscustomobject]@{ Command = 'rg' Description = 'find in files https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md' } ) Write-Output $tips | Format-Table } # Define aliases to call fuzzy methods from PSFzf New-Alias -Scope Global -Name fcd -Value Invoke-FuzzySetLocation2 -ErrorAction Ignore New-Alias -Scope Global -Name fe -Value Invoke-FuzzyEdit -ErrorAction Ignore New-Alias -Scope Global -Name fh -Value Invoke-FuzzyHistory -ErrorAction Ignore New-Alias -Scope Global -Name fkill -Value Invoke-FuzzyKillProcess -ErrorAction Ignore New-Alias -Scope Global -Name fz -Value Invoke-FuzzyZLocation -ErrorAction Ignore
-
Windows Terminal Quake Mode
Are you using PSFzf or something else? https://github.com/kelleyma49/PSFzf
-
PsFzf Open File / Open Directory
kelleyma49/PSFzf: A PowerShell wrapper around the fuzzy finder fzf β https://github.com/kelleyma49/PSFzf
PSReadLine
-
Tools to achieve a 10x developer workflow on Windows
sets up PSReadLine: command autocompletion and many other features.
-
Wierd behaviour with using 'Dir' as an alias for my own function
Sounds like a bug, you should report it to PSReadLine. I believe PSReadLine and not PowerShell is the one that handles tab completion here, it sounds like it's caching the alias target so still thinks it is completing Get-ChildItem.
-
DirectoryPredictor - Plugin module for PSReadLine to actively search the current directory for matching files
I then used PSReadLine's GitHub to understand how they made their own module, shared data with Cmdlets and everything inbetween. Which got me the rest of the day.
-
Keyword search through PSReadline command history with '#' operator?
Highly recommend checking out the teamβs sample file: https://github.com/PowerShell/PSReadLine/blob/master/PSReadLine/SamplePSReadLineProfile.ps1
-
Using PowerShell for non system-administration
I have a hotkey that converts aliases on the command line when I hit alt+% That makes it easier to paste into discord or wherever. Why % ? I'm not sure, that's what what PSReadLine used
-
Leveling up Windows Powershell with Oh My Posh
GitHub - PowerShell/PSReadLine: A bash inspired readline implementation for PowerShell
- PSReadline β bash inspired readline implementation for PowerShell
-
Hot Reload with Notepad in .NET 6
Bit late, but it's PSReadLine
-
New PowerShell Version - v7.2.0-preview.6: [7.2.0-preview.6] - 2021-05-27
Just a bit of a heads up. The PSReadLine 2.2.0 beta 1 and beta 2 do not work with this release so either you can downgrade to PSReadLine 2.1.0 or stay on PowerShell 7.2.0 preview 5. The PSReadLine 2.2.0 beta 3 will solve the issue.
-
How to solve "Update-Help: Failed to update Help for the module(s) 'PSReadline, WindowsUpdateProvider' with UI culture(s) {en-US} : One or more errors occurred. (Response status code does not indicate success: 404 (The specified blob does not exist.).)." ?
The PSReadline update-help failing is new and should probably have an issue filed on their github, assuming there isn't one already. The failure on "WindowsUpdateProvider" has been around for years, you're missing help for these cmdlets without it
What are some alternatives?
winget-cli - WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
ohmyzsh - π A delightful community-driven (with 2,300+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.
Windows Terminal - The new Windows Terminal and the original Windows console host, all in the same place!
libxo - The libxo library allows an application to generate text, XML, JSON, and HTML output using a common set of function calls. The application decides at run time which output style should be produced.
AutoHotkey - AutoHotkey - macro-creation and automation-oriented scripting utility for Windows.
PSScriptAnalyzer - Download ScriptAnalyzer from PowerShellGallery
PSGSuite - Powershell module for Google / G Suite API calls wrapped in handy functions. Authentication is established using a service account via P12 key to negate the consent popup and allow for greater handsoff automation capabilities
oh-my-posh - The most customisable and low-latency cross platform/shell prompt renderer
Scoop - A command-line installer for Windows.
bass - Make Bash utilities usable in Fish shell
Rectangle - Move and resize windows on macOS with keyboard shortcuts and snap areas