function welcome {
echo "
_ _ _ _ _ __ _
| | | | | | | | | / _| | |
| |__ ___| | | ___ _ __ __ ___ | |_| |__ ___ _ __ | |_ _ _| | _____ _ __
| '_ \ / _ \ | |/ _ \ | '_ ` _\ / _ \| __| '_ \ / _ \ '__| | _| | | | |/ / _ \ '__|
| | | | __/ | | (_) | | | | | | | (_) | |_| | | | __/ | | | | |_| | < __/ |
|_| |_|\___|_|_|\___/ |_| |_| |_|\___/ \__|_| |_|\___|_| |_| \__,_|_|\_\___|_|
"
}
#只顯示當前文件夾名稱
function prompt {
$p = pwd|Split-Path -Leaf
"$p :"
}
#prompt end
#conda配置
(& "C:\Users\hello\miniconda3\Scripts\conda.exe" "shell.powershell" "hook") | Out-String | Invoke-Expression
#conda activate 別名
function ca ([String]$env_name="base"){
conda activate $env_name
}
function cad {
conda deactivate
}
function jb {
jupyter notebook
}
#conda end
#設置清屏
# remove-item alias:cls
# function cls {
# clear-host
# welcome
# }
# remove-item alias:clear
# function clear {
# clear-host
# welcome
# }
# Set-PSReadLineKeyHandler -Chord Ctrl+l -ScriptBlock {
# [Microsoft.PowerShell.PSConsoleReadLine]::RevertLine()
# [Microsoft.PowerShell.PSConsoleReadLine]::Insert('clear')
# [Microsoft.PowerShell.PSConsoleReadLine]::AcceptLine()
# }
#清屏end
#快速打開 profile
function profile {
code $profile
}
#profile end
#用Select-String實現linux的grep
remove-item alias:ls
function ls {
Get-ChildItem | out-string -stream
}
set-alias -name grep -value select-string
#set grep end
# 快速打開桌面
function cdd {
cd ~/Desktop
}
# desktop end
welcome
powershell profile
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.