[misc] lf for win

This commit is contained in:
Klesh Wong 2021-03-21 18:09:58 +08:00
parent 2e873564c6
commit 6324cfd7b0
2 changed files with 15 additions and 0 deletions

View File

@ -1,5 +1,10 @@
set icons
set drawbox
cmd mkdir %mkdir "$@"
cmd fp %powershell -NoProfile -Command Set-Clipboard $env:f
cmd fn %powershell -NoProfile -Command Set-Clipboard (Split-Path -Leaf ($env:f -replace '"',''))
map <f-2> rename

View File

@ -113,3 +113,13 @@ function pass-edit {
Remove-Item $tmpfile.FullName -Force
}
}
function f {
[Cmdletbinding()]
$tmpfile = New-TemporaryFile
lf -last-dir-path $tmpfile
$lastdir = Get-Content $tmpfile
Remove-Item $tmpfile
cd $lastdir
}