diff --git a/cli/lf/lfrc.win b/cli/lf/lfrc.win index 897eb3f..8831d89 100644 --- a/cli/lf/lfrc.win +++ b/cli/lf/lfrc.win @@ -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 rename diff --git a/win/profile.ps1 b/win/profile.ps1 index 6fd1433..4cde92e 100644 --- a/win/profile.ps1 +++ b/win/profile.ps1 @@ -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 +}