From 2e873564c65e2dd1c799f09758b770bf7bd802cb Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Sun, 28 Feb 2021 12:33:19 +0800 Subject: [PATCH] [feature] mkdir / copy fullpath / copy file name --- cli/lf/lfrc.win | 5 +++++ win/setup/lf.ps1 | 3 +++ win/setup/windows-terminal.ps1 | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 cli/lf/lfrc.win create mode 100644 win/setup/lf.ps1 diff --git a/cli/lf/lfrc.win b/cli/lf/lfrc.win new file mode 100644 index 0000000..897eb3f --- /dev/null +++ b/cli/lf/lfrc.win @@ -0,0 +1,5 @@ + +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 '"','')) diff --git a/win/setup/lf.ps1 b/win/setup/lf.ps1 new file mode 100644 index 0000000..5745f22 --- /dev/null +++ b/win/setup/lf.ps1 @@ -0,0 +1,3 @@ + +$dotfiles=(Get-Item $PSScriptRoot).Parent.Parent.FullName +New-Item -Force -ItemType SymbolicLink -Target $dotfiles\cli\lf\lfrc.win -Path $Env:LOCALAPPDATA\lf\lfrc diff --git a/win/setup/windows-terminal.ps1 b/win/setup/windows-terminal.ps1 index a3ac8f0..d773fd0 100644 --- a/win/setup/windows-terminal.ps1 +++ b/win/setup/windows-terminal.ps1 @@ -1,3 +1,3 @@ $dotfiles=(Get-Item $PSScriptRoot).Parent.Parent.FullName -New-Item -Force -ItemType SymbolicLink -Target $dotfiles\WindowsTerminal\settings.json -Path $Env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json +New-Item -Force -ItemType SymbolicLink -Target $dotfiles\win\WindowsTerminal\settings.json -Path $Env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json