首页 > 其他分享 >安装配置Oh My Posh

安装配置Oh My Posh

时间:2023-01-29 16:22:05浏览次数:52  
标签:Posh Oh PowerShell theme My your

Tutorial: Set up a custom prompt for PowerShell or WSL with Oh My Posh

Install a Nerd Font

推荐Meslo Nerd Font

安装完成后打开Windows Terminal然后按"Ctrl+Shift+,(逗号)"来打开settings.json配置文件

"profiles": {
    "defaults": {
      "font": {
        "face": "MesloLGS NF"
      }
    },

Customize your PowerShell prompt with Oh My Posh

Install Oh My Posh for PowerShell

winget install oh-my-posh

This will install:

oh-my-posh.exe: The Windows executable
themes: The latest Oh My Posh themes

winget install XP8K0HKJFRXGCK

Choose and apply a PowerShell prompt theme

Choose a theme and update your PowerShell profile with this command. (You can replace notepad with the text editor of your choice.)

notepad $PROFILE

PS:The $PROFILE variable
Current User, Current Host - $PROFILE

$PROFILE | Get-Member -Type NoteProperty

it should be ""C:\Users{username}\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1""

Add the following to the end of your PowerShell profile file to set the paradox theme. (Replace paradox with the theme of your choice.)

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

Use Terminal-Icons to add missing folder or file icons

To install Terminal-Icons with PowerShell, use the command:

Install-Module -Name Terminal-Icons -Repository PSGallery

参考

https://zhuanlan.zhihu.com/p/354603010
https://learn.microsoft.com/en-us/windows/terminal/tutorials/custom-prompt-setup

标签:Posh,Oh,PowerShell,theme,My,your
From: https://www.cnblogs.com/joe-yang/p/17073023.html

相关文章

  • PHPMyWind编辑器支持pdf导入
    ​ 当前功能基于PHP,其它语言流程大致相同 1.新增上传wordjson配置在ueditor\php\config.json中新增如下配置:     /* 上传word配置 */    "wordAction......
  • MySQL 备份工具 XtraBackup 系列2 --- 备份
    一、承上启下1.MySQL安装https://www.cnblogs.com/eagle6688/p/8975090.html2. XtraBackup安装https://www.cnblogs.com/eagle6688/p/17066856.html二、全量备份1.......
  • SpinrgBoot + MybatisPlus 多租户整合
     关于SpringBoot 整合mybatisPlus多租户的一点小实践。https://github.com/doudou20188/mybatisPlus_TenantIdManager简易项目,自行拉取参考。上代码,蛮简单的,其实就......
  • PHPMyWind编辑器支持pdf自动导入
    ​ 1.编辑器修改(可选)1.1在 ueditor/config.json 中添加代码块    /* 上传word配置 */    "wordActionName":"wordupload",/* 执行上传视频的action......
  • MybatisUtil 模板类
    由于SqlSessionFactory一般只需要创建一次,因此我们可以创建一个工具类来集中创建SqlSession,这样会更加方便一些:publicclassMybatisUtil{//在类加载时就进行创建......
  • mysql 管理员常用命令
    1、创建用户createuseradmin@localhostidentifiedby'password';2、赋权grantprivilegesONdatabase.tableTO'username'[@'host'][withgrantoption]gr......
  • golang使用sqlx操作MySQL
     packagemain//sqlx示例import("errors""fmt"_"github.com/go-sql-driver/mysql""github.com/jmoiron/sqlx")varDB*sqlx.DBtypeUs......
  • golang连接操作mysql
    golang操作mysqlpackagemainimport("database/sql""fmt""time"_"github.com/go-sql-driver/mysql")//定义一个全局db对象vardb*sql.DB......
  • linux-安装mysql
    1.在/use/local下mkdirmysql  2.切换到mysql文件夹下cdmysql  3.下载mysql wgethttps://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.20-lin......
  • PHPMyWind编辑器支持pdf一键导入
    ​ 图片的复制无非有两种方法,一种是图片直接上传到服务器,另外一种转换成二进制流的base64码目前限chrome浏览器使用首先以um-editor的二进制流保存为例:打开umeditor.j......