以下の公式資料
オプション -p でプロファイル
オプション -d でターゲットのディレクトリ
を設定できるらしい。
従って
Cygwin からだと
Context Menu への追加はこうかな?
cmd.exe からだと、
- Microsoft / Docs / Windows ターミナル / Windows ターミナルに対するコマンド ライン引数を使用する
オプション -p でプロファイル
オプション -d でターゲットのディレクトリ
を設定できるらしい。
従って
wt -d . -p Ubuntuみたいにすると、カレントディレクトリで Ubuntu を開くことが出来る。
Cygwin からだと
cygstart wt -d . -p Ubuntu
Context Menu への追加はこうかな?
cmd.exe からだと、
REG ADD HKCR\Folder\Shell\WSLUbuntuHere /f /ve /d "WSL Ubuntu here" REG ADD HKCR\Folder\Shell\WSLUbuntuHere\command /f /ve /t REG_EXPAND_SZ /d """"%^LOCALAPPDATA%\Microsoft\WindowsApps\wt.exe""" -d """%L""" -p Ubuntu" REG ADD HKCR\Directory\Background\Shell\WSLUbuntuHere /f /ve /d "WSL Ubuntu here" REG ADD HKCR\Directory\Background\Shell\WSLUbuntuHere\command /f /ve /t REG_EXPAND_SZ /d """"%^LOCALAPPDATA%\Microsoft\WindowsApps\wt.exe""" -d """%V""" -p Ubuntu"PowerShell からだと、
REG ADD HKCR\Folder\Shell\WSLUbuntuHere /f /ve /d "WSL Ubuntu here" REG ADD HKCR\Folder\Shell\WSLUbuntuHere\command /f /ve /t REG_EXPAND_SZ /d '"""%LOCALAPPDATA%\Microsoft\WindowsApps\wt.exe""" -d """%L""" -p Ubuntu' REG ADD HKCR\Directory\Background\Shell\WSLUbuntuHere /f /ve /d "WSL Ubuntu here" REG ADD HKCR\Directory\Background\Shell\WSLUbuntuHere\command /f /ve /t REG_EXPAND_SZ /d '"""%LOCALAPPDATA%\Microsoft\WindowsApps\wt.exe""" -d """%V""" -p Ubuntu'消すときは以下のように
REG DELETE HKCR\Folder\Shell\WSLUbuntuHere /f REG DELETE HKCR\Directory\Background\Shell\WSLUbuntuHere /f
「"windows terminal" "from here"」でググると以下 issue が見つかる
Install/uninstall scripts for Windows Terminal context menu items
また、2日前に以下の pr が commit されてるので、近々標準で from here 搭載になるっぽい。
- GitHub / microsoft / terminal / issue / Add "open Windows terminal here" into right-click context menu #1060
Install/uninstall scripts for Windows Terminal context menu items
- GitHub / lextm / windowsterminal-shell
また、2日前に以下の pr が commit されてるので、近々標準で from here 搭載になるっぽい。
- GitHub / microsoft /terminal / issue / Add a context menu entry to "Open Windows Terminal here" #6100
タグ
コメントをかく