• powershell profile


    打开powershell terminal,修改配置code $profile

    # Shows navigable menu of all options when hitting Tab
    Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
    
    # Autocompletion for arrow keys
    Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward
    Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward
    
    Import-Module posh-git
    Import-Module oh-my-posh
    Set-Theme Paradox
    
    function Get-GitSStatus { & git status }
    New-Alias -Name gs -Value Get-GitSStatus -Force -Option AllScope
    function Get-GitGraph { & git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(dim white)%aD%C(reset) %C(dim white)(%ar) %C(dim white)- %an%C(reset) %C(reset)%C(bold yellow)%d%C(reset)%n''          %C(white)%s%C(reset)' --all }
    New-Alias -Name gg -Value  Get-GitGraph -Force -Option AllScope
    function Get-GitGraphC { & git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(dim white)%aD%C(reset) %C(dim white)(%ar) %C(dim white)- %an%C(reset) %C(reset)%C(bold yellow)%d%C(reset)%n''          %C(white)%s%C(reset)' --all -c }
    New-Alias -Name ggc -Value  Get-GitGraphC -Force -Option AllScope
    function Get-GitGraphS { & git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(dim white)%aD%C(reset) %C(dim white)(%ar) %C(dim white)- %an%C(reset) %C(reset)%C(bold yellow)%d%C(reset)%n''          %C(white)%s%C(reset)' --all --stat }
    New-Alias -Name ggs -Value  Get-GitGraphS -Force -Option AllScope
    
    function Run-gitCheck { & git checkout }
    New-Alias -Name gitck -Value  Run-gitCheck -Force -Option AllScope
    function Run-gitBranch { & git branch }
    New-Alias -Name gitbr -Value  Run-gitBranch -Force -Option AllScope
    
    
  • 相关阅读:
    Head First设计模式读书笔记
    通过FileReference打开本地图片崩溃的解决方法
    Asea——轻量级的AS3模块配置与加载管理库
    AGAL反编译器
    [Stage3D]硬件加速的径向模糊
    C#的timer类问题~!
    c语言中的大数运算模块
    TRACERT命令及用法
    Linux用户和用户组的管理概述
    linux下挂载windows的共享文件目录ftp文件夹到/root/wind目录
  • 原文地址:https://www.cnblogs.com/Searchor/p/13497081.html
Copyright © 2020-2023  润新知