国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell

這篇具有很好參考價值的文章主要介紹了Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

Windows PowerShell 美化

前言

Linux 和 macOS 上的 PowerShell 使用 .NET Core,即 Microsoft Windows 上的完整 .NET Framework 的子集。 這非常重要,因為 PowerShell 提供對基礎(chǔ)框架類型和方法的直接訪問。 因此,在 Windows 上運行的腳本可能無法在非 Windows 平臺上運行,因為框架之間存在差異。

Windows 終端程序是一款新式、快速、高效、強大且高效的終端應(yīng)用程序,適用于命令行工具和命令提示符,PowerShell和 WSL 等 Shell 用戶。主要功能包括多個選項卡、窗格、Unicode、和 UTF-8 字符支持,GPU 加速文本渲染引擎以及自定義主題、樣式和配置。

本文將 .Net Core的PowerShellPowerShell 7 代替

參考:
.NET Framework PowerShell和 .NET Core PowerShell的區(qū)別: https://learn.microsoft.com/zh-cn/powershell/scripting/whats-new/differences-from-windows-powershell?view=powershell-7.3
Windows Terminal簡介: https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701?hl=zh-cn&gl=cn

下載并安裝 Windows Terminal(Windows 11直接跳過)

  1. Github下載
  2. 使用Windows 10自帶的Microsoft Store也可以下載(建議)

下載并安裝 PowerShell 7

  1. Github下載 (建議下載msi結(jié)尾的 Windows Installer 安裝包文件,可以安裝到其他盤,不用手動設(shè)置環(huán)境變量。并且可以選擇添加到右鍵菜單。)
  2. 使用Windows 10自帶的 Microsoft Store 也可以下載 (不用配置Windows Terminal)
    改變安裝路徑
    Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell
    將PowerShell 7添加到右鍵菜單,選擇如圖所示的選項
    Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell
    Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell

問題

Windows Terminal和安裝的PowerShell 7以管理員運行的時候會出現(xiàn) Windows無法訪問指定設(shè)備、路徑、或文件,你可能沒有適當(dāng)?shù)臋?quán)限訪問該項目。

解決

C:\Program Files目錄中有個WindowsApps文件夾,該文件夾是隱藏的,需要開啟查看隱藏文件及文件夾的功能,該文件夾是Windows Store下載程序的文件夾,更改文件夾權(quán)限 右鍵該文件夾的屬性–>安全->高級–>更改–>高級–>立即查找–>選擇自己電腦的用戶名–>確定–>勾選替換子容器和對象的所有者–>確定,開啟文件夾的繼承權(quán) 右鍵該文件夾的屬性–>安全–>高級–>啟用繼承

下載并安裝 Oh-My-Posh

  1. Github下載
  2. PowerShell命令下載并安裝
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://ohmyposh.dev/install.ps1'))

參考:https://ohmyposh.dev/docs/installation/windows

下載并安裝 oh-my-posh 需要的字體

  1. Nerd Fonts (建議下載DejaVuSansMono Nerd Fonts字體)
  2. PowerLine-Fonts

本文安裝以下兩個字體:
Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell

安裝字體直接雙擊打開點擊安裝

配置 Windows Terminal 使用 Powershell 7

Ctrl+, 快捷鍵直接打開設(shè)置
Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell
PowerShell 圖標(biāo)鏈接

Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell
點擊保存

打卡 Windows Terminal --> 點擊剛才配置的文件 --> 外觀(在其他設(shè)置里,如果窗口小了,可以下滑鼠標(biāo)滾輪,就可以看到了

設(shè)置主題:
Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell
選擇剛才安裝的字體
Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell
選擇光標(biāo)形狀
Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell
設(shè)置背景圖像(根據(jù)自己的愛好選擇
Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell
點擊保存,就配置好了

配置oh-my-posh

PowerShell中輸入

oh-my-posh init pwsh --config "$env:USERPROFILE\AppData\Local\Programs\oh-my-posh\themes\1_shell.omp.json" | Invoke-Expression

oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\1_shell.omp.json" | Invoke-Expression

oh-my-posh自帶的主題在:C:\Users\UserName\AppData\Local\Programs\oh-my-posh\themes\

官網(wǎng)顯示的主題樣式和對應(yīng)的主題名:https://ohmyposh.dev/docs/themes
使用 Get-PoshThemes Powershell命令也可以查看對應(yīng)的主題樣式和主題名

配置PowerShell 7環(huán)境變量

if(!(Test-Path -Path $PROFILE)){ New-Item -ItemType file -Path $PROFILE -Force} & notepad $PROFILE

Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell
最后在記事本中輸入以下PowerShell命令

選擇自己喜歡的主題,替換下面的主題名

oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\主題名.omp.json" | Invoke-Expression

然后輸入以下PowerShell命令,使配置文件立即生效

. $PROFILE

保存退出

展示
Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell

配置 PowerShell 7

WIN+R 輸入pwsh進入PowerShell 7–>鼠標(biāo)左鍵點擊左上角的PowerShell圖標(biāo)–>點擊屬性–>字體選擇安裝好的Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell
–>顏色不透明度設(shè)置為90%(根據(jù)自己的喜好設(shè)置)
Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell
展示
Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell

配置并美化IDEA的 PowerShell 7

  1. 配置IDEA使用PowerShell 7
    文件(File)–>設(shè)置(Settings)–>工具(Tools)–>終端(Terminal)
    選擇自己安裝的PowerShell 7
    Microsoft Store安裝的在 C:\Users\windy\AppData\Local\Microsoft\WindowsApps\pwsh.exe
    Github下載安裝的在安裝時你自己選擇的目錄
    Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell
  2. 配置IDEA的PowerShell 7終端字體
    Ctrl+Alt+S 快捷鍵打開IDEA設(shè)置(Settings)–>編輯器(Editor)–>配色方案(Color Scheme)–>控制臺字體(Console Font)–>選擇使用控制臺字體,而不是默認(Use console font instead of the default)–>選擇安裝好的字體
    Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell
    展示
    Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell

配置并美化VsCode的PowerShell 7

  1. 配置 VsCode 的默認終端
    文件(File)–>首選項(Preferences)–>設(shè)置(Settings)–>搜索(Search settings) Profile: Window -->點擊在Settings.json中編輯(Edit in settings.json)
    Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell
    Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell
    復(fù)制以下json代碼并覆蓋圖中選中的json代碼
"terminal.integrated.profiles.windows": {
    "PowerShell 7": {
        "path": [
        	// 安裝PowerShell 7的路徑,粘貼到j(luò)son文件之后,要刪除這行
            "D:\\powershell\\7\\pwsh.exe"
        ],
        "args": [
            "-NoLogo"
        ]
    }
},
"terminal.integrated.defaultProfile.windows": "PowerShell 7",

Ctrl+S 保存settings.json

參考:https://code.visualstudio.com/docs/terminal/profiles文章來源地址http://www.zghlxwxcb.cn/news/detail-464868.html

  1. 配置 VsCode 的 PowerShell 7 終端字體
    Windows設(shè)置(WIN+I)–>個性化–>字體–>搜索字體名
    Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell
    VsCode設(shè)置中搜索 Editor: Font Family
    在其余的字體后加上查看的字體名,字體直接用英文逗號分隔。 注意:字體之間有空格的名稱,要在字體名的兩邊加上英文單引號!
    Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell
    展示
    Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell

到了這里,關(guān)于Windows 10 系統(tǒng)PowerShell美化 IDEA終端、VsCode終端以及Windows Terminal的PowerShell的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • VScode替換cmd powershell為git bash 終端,并設(shè)置為默認

    VScode替換cmd powershell為git bash 終端,并設(shè)置為默認

    1. 解決VScode缺少git bash的問題_failed to start bash - is git-bash.exe on the syst_Rudon濱海漁村的博客-CSDN博客 效果解決步驟找到git安裝目錄下的/bin/bash.exe,復(fù)制其絕對路徑,例如D:Program FilesGitbinbash.exe把路徑的右斜杠轉(zhuǎn)義,例如D:\\\\Program Files\\\\Git\\\\bin\\\\bash.exe其實就是一個斜杠變兩個在

    2024年02月12日
    瀏覽(22)
  • Windows PowerShell:連接Linux終端小助手

    Windows PowerShell:連接Linux終端小助手

    在研究Quark-n的時候,利用Windows自帶的遠程桌面連接,實現(xiàn)了在Windows上看到Linux的GUI,但是很快就發(fā)現(xiàn)了好多問題,比如想用Tab補全命令的時候,它不靈,只能Shitf+Tab,有悖于傳統(tǒng)操作按鍵,而且GUI有延時,拖動終端時有拖影,圖形操作體驗很差。為了解決這個問題,便在網(wǎng)上

    2024年02月11日
    瀏覽(22)
  • Powershell / windows終端 無法加載文件 因為在此系統(tǒng)上禁止運行腳本。有關(guān)詳細信息,請參閱 https:/go.microsoft.com/fwlink/?LinkID=135170

    Powershell / windows終端 無法加載文件 因為在此系統(tǒng)上禁止運行腳本。有關(guān)詳細信息,請參閱 https:/go.microsoft.com/fwlink/?LinkID=135170

    在 powershell?或者 windows 終端中運行腳本文件時,提示“無法加載文件 因為在此系統(tǒng)上禁止運行腳本。有關(guān)詳細信息,請參閱 https:/go.m icrosoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies?!?PowerShell?或者 windows 終端啟動時,為了確保安全,文件的執(zhí)行策略默認設(shè)置為 Restric

    2024年02月01日
    瀏覽(59)
  • 終端(命令提示符或Windows PowerShell或Azure Cloud Shell)概述

    終端(命令提示符或Windows PowerShell或Azure Cloud Shell)概述

    終端(命令提示符或Windows PowerShell或Azure Cloud Shell)是一種很 不 好用的東西 就是要背,很 不 爽 Windows 終端是一個新式主機應(yīng)用程序,它面向你喜愛的命令行 shell,如命令提示符、PowerShell 和 bash(通過適用于 Linux 的 Windows 子系統(tǒng) (WSL))。 它的主要功能包括多個選項卡、窗格

    2024年01月23日
    瀏覽(48)
  • windows10下powershell中如何在后臺執(zhí)行python程序

    windows10下powershell中如何在后臺執(zhí)行python程序

    在windows10本地執(zhí)行時間較長的程序時,很容易忘記,隨手關(guān)掉編譯器,程序就此中斷,造成精神傷害。 如果不管不掛起,不管日志重定向,我要運行的python腳本的命令很簡單 現(xiàn)在掛起在后臺,需要把原先在控制臺顯示的一大堆輸出,重定向到日志文件中。注意,在win10下不可

    2024年03月09日
    瀏覽(26)
  • PowerShell 美化(oh-my-posh)

    PowerShell 美化(oh-my-posh)

    1、 修改默認右鍵菜單 直接使用這個命令可以將 win11 的右鍵菜單修改為 win10 的右鍵菜單: 如果要回復(fù)成 win11 默認右鍵菜單的話: 2、 尋找安裝目錄 比如說我的安裝目錄: 3、 修改注冊表 將這個路徑復(fù)制下來,打開注冊表: win+r - regedit 在注冊表中進入路徑: 新建一個項:

    2024年02月10日
    瀏覽(69)
  • windows10系統(tǒng)下安裝opencv4.7.0+VSCode+(C++)環(huán)境搭建

    windows10系統(tǒng)下安裝opencv4.7.0+VSCode+(C++)環(huán)境搭建

    windows10系統(tǒng)下安裝opencv4.7.0+VSCode+(C++)環(huán)境搭建 1.VScode最新版 2.Opencv:opencv-4.7.0、opencv_contrib-4.7.0(擴展庫,可自選是否安裝) 3.MinGW-w64:選擇GCCWindows版本 4.c-make工具:最新版,應(yīng)選擇二進制版本 注意 : (1)以上安裝包目錄文件中不應(yīng)包含空格空格和其他非法字符,否則后面會

    2023年04月10日
    瀏覽(25)
  • 電腦新裝系統(tǒng)優(yōu)化,win10優(yōu)化,win10美化

    電腦新裝系統(tǒng)優(yōu)化,win10優(yōu)化,win10美化

    公司發(fā)了新的筆記本,分為幾步做 1.系統(tǒng)優(yōu)化,礙眼的關(guān)掉。防火墻關(guān)掉、頁面美化 2.安裝必備軟件及驅(qū)動 3.數(shù)據(jù)遷移 4.開發(fā)環(huán)境配置 目錄復(fù)制 關(guān)掉底部菜單欄花里胡哨 消息通知優(yōu)化 關(guān)閉粘貼鍵 開始菜單優(yōu)化 開機啟動優(yōu)化 關(guān)閉通知 關(guān)閉win安全 關(guān)閉動畫 開始菜單磁條優(yōu)化

    2024年02月15日
    瀏覽(22)
  • 【問題解決】VSCode終端中沒有Git-Bash以及將其設(shè)置為默認終端

    【問題解決】VSCode終端中沒有Git-Bash以及將其設(shè)置為默認終端

    1.找到你 git bin bash.exe 的安裝路徑 2.在終端里點擊小箭頭 3. 選擇配置終端設(shè)置 4.找到terminal.integrated.profiles.windows,進入json編輯 5.在配置文件中添加 6.重啟VSCode

    2024年02月09日
    瀏覽(55)
  • VScode 終端無法識別npm以及Missing script: “serve“ 問題

    VScode 終端無法識別npm以及Missing script: “serve“ 問題

    原因是沒有全局安裝npm npm list --depth=0 -global npm install -g npm? ? ?原因是package.json中沒有配置:\\\"serve\\\": \\\"vite serve\\\" \\\"serve\\\": \\\"vite serve\\\"

    2024年02月16日
    瀏覽(21)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包