mirror of
https://github.com/denisidoro/navi.git
synced 2026-01-23 02:14:19 +00:00
Adds a check to create the profile file if it doesn't exist
Signed-off-by: alexis-opolka <53085471+alexis-opolka@users.noreply.github.com>
This commit is contained in:
parent
2bb57a23b8
commit
6f82c186a7
1 changed files with 6 additions and 0 deletions
|
|
@ -32,6 +32,12 @@ function InstallNaviWidgetModule(){
|
|||
exit 1
|
||||
}
|
||||
|
||||
### We first need to be sure the profile has been created
|
||||
if (-Not(Test-Path -Path $PROFILE)) {
|
||||
### The Profile file hasn't been created yet
|
||||
New-Item -ItemType "file" -Path $PROFILE -Force
|
||||
}
|
||||
|
||||
Write-Debug "Registering the navi shortcut inside the current shell session"
|
||||
Set-PSReadlineKeyHandler -BriefDescription "A keybinding to open Navi Widget" -Chord Ctrl+g -ScriptBlock { Invoke-NaviWidget }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue