好吧,这应该是一个相当简单的问题,但是如果没有所有可能性,恐怕它正在成为一个加载一个,只是为了安装Microsoft Windows Terminal。
是一个新的、现代的、快速的、高效的、强大的和高效的终端应用程序,适用于命令行工具和 shell(如命令提示符、PowerShell 和 WSL)的用户。其主要功能包括多个选项卡、Unicode 和 UTF-8 字符支持、GPU 加速文本渲染引擎以及自定义主题、样式和配置。
它是一个开源项目,可在https://github.com/microsoft/terminal 获得
尝试从Microsoft Windows Terminal Shop安装,我会得到(如果我从 Microsoft Shop 搜索并单击它,结果将相同):
尝试使用 安装choco install microsoft-windows-terminal,我会得到:
ERROR: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Deployment failed with HRESULT: 0x80073CF3, Package failed updates, dependency or conflict validation.
Windows cannot install package Microsoft.WindowsTerminal_0.11.1121.0_x64__8wekyb3d8bbwe because this package depends on a framework that …Run Code Online (Sandbox Code Playgroud)在 WSL2(当前文件夹)中运行/home/my-linux-user/:
az aks get-credentials --resource-group my-resource-group --name cluster-name
输出:
Merged "cluster-name" as current context in C:\Users\my-windows-user\.kube\config
我需要做什么才能让 Azure CLI 将 kube 配置放入 WSL 中的 Linux 主文件夹中?
azure-cli windows-subsystem-for-linux azure-aks windows-terminal
Windows 终端预览版即将推出的一个功能是它具有完整的表情符号支持:
相比:
在 Node.js 中,如何检测我是否在 Windows 终端(而不是其“裸”变体)包装的终端中运行?是否有我可以提取的环境变量或可以进行同步测试?
我想使用wt.exe命令行在Windows 终端中打开 4 个相等的窗格。这是预期的结果:
我尝试使用split-pane,但没有focus-pane命令,它不起作用。
是否有可能以任何其他方式这样做?
我只想将 Python 添加到 Windows 终端应用程序的选项卡选项中。我在powershell中使用以下代码提取了GUID
>> [OutputType([System.Management.Automation.PSObject])]
>> [CmdletBinding()]
>> param (
>> [Parameter()]
>> [ValidateNotNullOrEmpty()]
>> [string]$Name
>> )
>>
>> $UninstallKeys = "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall", "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall"
>> $null = New-PSDrive -Name HKU -PSProvider Registry -Root Registry::HKEY_USERS
>> $UninstallKeys += Get-ChildItem HKU: -ErrorAction SilentlyContinue | Where-Object { $_.Name -match 'S-\d-\d+-(\d+-){1,14}\d+$' } | ForEach-Object { "HKU:\$($_.PSChildName)\Software\Microsoft\Windows\CurrentVersion\Uninstall" }
>> if (-not $UninstallKeys) {
>> Write-Verbose -Message 'No software registry keys found'
>> } else {
>> foreach ($UninstallKey in $UninstallKeys) {
>> if …Run Code Online (Sandbox Code Playgroud) 我想要的是打开具有 Powershell 并运行特定命令的新选项卡(在我的情况下为“npm run local”)。
我期待这会奏效,
wt -w 0 -p "Windows Powershell" npm run local
但是,它给出了错误,
[error 0x80070002 when launching `npm run local']
有可能吗?
*注意:我做了很多研究,也阅读了官方文档,但我找不到方法。
我正在使用新的Windows终端,并试图使其启动我的WSL终端。这是我要使用的设置:
{
"acrylicOpacity" : 0.75,
"closeOnExit" : true,
"colorScheme" : "Campbell",
"commandline" : "%LOCALAPPDATA%/wsltty/bin/mintty.exe --WSL= --configdir='%APPDATA%/wsltty' -~ ",
"cursorColor" : "#FFFFFF",
"cursorShape" : "bar",
"fontFace" : "Consolas",
"fontSize" : 10,
"guid" : "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"historySize" : 9001,
"icon" : "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png",
"name" : "wsl",
"padding" : "0, 0, 0, 0",
"snapOnInput" : true,
"startingDirectory" : "%USERPROFILE%",
"useAcrylic" : true
}
Run Code Online (Sandbox Code Playgroud)
但是,它所做的只是打开某种CMD。
什么是运行WSL终端的正确命令
编辑:
我确实注意到GUID与常规CMD是相同的,所以我更改了它。然后它没有启动一个外部的外壳。
通过 settings.json 尝试自定义 Windows 终端。我发现了一个profiles.json,它非常接近新的约定,粘贴到settings.json时可以工作(我知道这是因为主题改变了)。问题是对“fontFace”的更改没有任何效果。我正在尝试为一些电力线的东西使用书呆子字体,在 ConEmu 中运行的 Powershell 中工作,但不在 Windows 终端中使用。这是 settings.json 的相关部分:
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
// You can add more global application settings here.
// To learn more about global settings, visit https://aka.ms/terminal-global-settings
// If enabled, selections are automatically copied to your clipboard.
"copyOnSelect": false,
// If enabled, formatted data is also copied to your clipboard
"copyFormatting": false,
// A profile specifies a command to execute paired with information about how it should look and feel.
// …Run Code Online (Sandbox Code Playgroud) 我已经在 Windows 终端中安装了 oh-my-posh 和 posh-git,但是它不会跟踪任何 git 更改,如图所示。不管我做了什么改变,它都只是显示这样,没有状态:
\n\n我也尝试过不使用 posh-git,因为我认为 oh-my-posh 默认情况下具有此功能,但结果仍然相同。
\n这是我的 oh-my-posh 主题:
\n{\n "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",\n "blocks": [\n {\n "alignment": "left",\n "segments": [\n {\n "background": "#91ddff",\n "foreground": "#100e23",\n "powerline_symbol": "\xee\x82\xb0",\n "properties": {\n "folder_icon": "\xef\x84\x95",\n "folder_separator_icon": " \xee\x82\xb1 ",\n "home_icon": "\xef\x9f\x9b",\n "style": "agnoster"\n },\n "style": "powerline",\n "type": "path"\n },\n {\n "background": "#95ffa4",\n "foreground": "#193549",\n "powerline_symbol": "\xee\x82\xb0",\n "style": "powerline",\n "type": "git"\n },\n {\n "background": "#906cff",\n "foreground": "#100e23",\n "powerline_symbol": "\xee\x82\xb0",\n "properties": {\n "prefix": " \xee\x88\xb5 "\n },\n …Run Code Online (Sandbox Code Playgroud) windows 终端预览的 exe 文件的名称是什么,它的路径和打开它的命令是什么?
就像 Windows 终端一样 wt.exe
windows-terminal ×10
windows ×3
powershell ×2
windows-subsystem-for-linux ×2
azure-aks ×1
azure-cli ×1
chocolatey ×1
javascript ×1
json ×1
node.js ×1
oh-my-zsh ×1
posh-git ×1
python ×1
terminal ×1