-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Tips - "Double Tab completion" and "Drag folder or file to get path #65
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
$tip = [tiPS.PowerShellTip]::new() | ||
$tip.CreatedDate = [DateTime]::Parse('2024-09-23') | ||
$tip.Title = 'Drag File or Folder into PowerShell to get the path' | ||
$tip.TipText = @' | ||
You can drag a file or folder from the File Explorer into PowerShell to get the full path. | ||
'@ | ||
$tip.Example = '' | ||
$tip.Urls = @( | ||
'https://lazyadmin.nl' | ||
) | ||
$tip.Category = [tiPS.TipCategory]::Terminal # Community, Editor, Module, NativeCmdlet, Performance, Security, Syntax, Terminal, or Other. | ||
$tip.Author = 'Rudy Mens (LazyAdmin)' # Optional. Get credit for your tip. e.g. 'Daniel Schroeder (deadlydog)'. | ||
#$tip.ExpiryDate = [DateTime]::Parse('2024-10-30') # Optional. If the tip is not relevant after a certain date, set the expiration date. e.g. Announcing a conference or event. | ||
|
||
# Category meanings: | ||
# Community: Social events and community resources. e.g. PowerShell Summit, podcasts, etc. | ||
# Editor: Editor tips and extensions. e.g. VSCode, ISE, etc. | ||
# Module: Modules and module tips. e.g. PSScriptAnalyzer, Pester, etc. | ||
# NativeCmdlet: Native cmdlet tips. e.g. Get-Process, Get-ChildItem, Get-Content, etc. | ||
# Performance: Tips to improve runtime performance. e.g. foreach vs ForEach-Object, ForEach-Object -Parallel, etc. | ||
# Security: Security tips. e.g. ExecutionPolicy, Constrained Language Mode, passwords, etc. | ||
# Syntax: Syntax tips. e.g. splatting, pipeline, etc. | ||
# Terminal: Terminal shortcuts and tips. e.g. PSReadLine, Windows Terminal, ConEmu, etc. | ||
# Other: Tips that don't fit into any of the other categories. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
$tip = [tiPS.PowerShellTip]::new() | ||
$tip.CreatedDate = [DateTime]::Parse('2024-09-23') | ||
$tip.Title = 'Press Tab twice to view all parameters, properties and possibilities' | ||
$tip.TipText = @' | ||
Add `Set-PSReadlineKeyHandler -Key Tab -Function Complete` to your PowerShell profile. This way you can press the Tab key twice after a command to view all possible parameters, properties, and possiblities. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spellcheck is also complaining that the various occurrences of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, now that I've approved a workflow run for you, I believe the workflows should run right away for any other PRs you submit, allowing you to get faster feedback about pipeline problems like this one. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have fixed the typos (and enabled the spell check extension in VS), so should be all good now. |
||
|
||
The double tab method is similar to the normal tab completion, except it will show you all of the options at once instead of just one option at a time. | ||
|
||
Note: Requires the `PSReadLine` module, which is included in PowerShell 5.1 and newer. | ||
'@ | ||
$tip.Example = @' | ||
# Open your PowerShell Profile: | ||
notepad $profile | ||
|
||
# Add the following line: | ||
Set-PSReadlineKeyHandler -Key Tab -Function Complete | ||
'@ | ||
$tip.Urls = @( | ||
'https://lazyadmin.nl/powershell/powershell-cheat-sheet/#good-to-know' | ||
) | ||
$tip.Category = [tiPS.TipCategory]::Terminal # Community, Editor, Module, NativeCmdlet, Performance, Security, Syntax, Terminal, or Other. | ||
$tip.Author = 'Rudy Mens (LazyAdmin)' # Optional. Get credit for your tip. e.g. 'Daniel Schroeder (deadlydog)'. | ||
#$tip.ExpiryDate = [DateTime]::Parse('2024-10-30') # Optional. If the tip is not relevant after a certain date, set the expiration date. e.g. Announcing a conference or event. | ||
|
||
# Category meanings: | ||
# Community: Social events and community resources. e.g. PowerShell Summit, podcasts, etc. | ||
# Editor: Editor tips and extensions. e.g. VSCode, ISE, etc. | ||
# Module: Modules and module tips. e.g. PSScriptAnalyzer, Pester, etc. | ||
# NativeCmdlet: Native cmdlet tips. e.g. Get-Process, Get-ChildItem, Get-Content, etc. | ||
# Performance: Tips to improve runtime performance. e.g. foreach vs ForEach-Object, ForEach-Object -Parallel, etc. | ||
# Security: Security tips. e.g. ExecutionPolicy, Constrained Language Mode, passwords, etc. | ||
# Syntax: Syntax tips. e.g. splatting, pipeline, etc. | ||
# Terminal: Terminal shortcuts and tips. e.g. PSReadLine, Windows Terminal, ConEmu, etc. | ||
# Other: Tips that don't fit into any of the other categories. |
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.
Spellcheck is complaining about this typo