Merge branch 'master' of gitee.com:klesh/dotfiles
This commit is contained in:
commit
07bf27188d
|
@ -32,6 +32,10 @@ function EnsurePath {
|
|||
[String] $PassPath
|
||||
)
|
||||
|
||||
if (!$PassPath) {
|
||||
throw "path is empty!"
|
||||
}
|
||||
|
||||
$PassPath = Join-Path $PASSWORD_STORE_DIR $PassPath
|
||||
if (!$PassPath.EndsWith(".gpg")) {
|
||||
$PassPath = $PassPath + ".gpg"
|
||||
|
@ -60,7 +64,7 @@ function FzfPass {
|
|||
$PASSWORD_STORE_DIR.Length+1,
|
||||
$_.FullName.Length-$PASSWORD_STORE_DIR.Length-5
|
||||
)
|
||||
} | Invoke-Fzf
|
||||
} | fzf
|
||||
}
|
||||
|
||||
function Edit-Pass {
|
||||
|
@ -71,6 +75,9 @@ function Edit-Pass {
|
|||
|
||||
if (!$PassPath) {
|
||||
$PassPath = FzfPass
|
||||
if (!$?) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
$PassPath = EnsurePath $PassPath
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
# curl: https://curl.se/windows/
|
||||
# ag: https://github.com/k-takata/the_silver_searcher-win32/releases
|
||||
# fzf: https://github.com/junegunn/fzf/releases/latest (2.7.2 not working with psfzf)
|
||||
$PSDefaultParameterValues = @{ "*:Proxy"="http://localhost:8123" }
|
||||
# utf-8 for i18n: Settings and then: All Settings -> Time & Language -> Language -> "Administrative Language Settings"
|
||||
$PSDefaultParameterValues = @{ "*:Proxy"="http://localhost:2021" }
|
||||
#Install-Module -Name PowerShellGet -Force -AllowPrerelease
|
||||
Register-PSRepository -Default -InstallationPolicy Trusted
|
||||
Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted
|
||||
|
|
Loading…
Reference in New Issue
Block a user