Powershell 的工作環境

2021-09-24 10:31:57 字數 1120 閱讀 6875

通常都在linux 下開發, 最新需要在window 下面開發,為了提高工作效率就在 powershell 下面搭建乙個簡單的工作環境。 這個指令碼有了基本的框架,可以方便個人根據各自的工作環境情況進行進一步的定製。

在桌面上建立快捷方式,快捷方式中命令列如下:

c:\windows\syswow64\windowspowershell\v1.0\powershell.exe -nologo -noexit -file c:\vingo\ps\devps.ps1

-file : 後面指向指令碼所在的位置, 指令碼內容如下(一些敏感配置已經刪除):

function

set-pathaliase

foreach

($command in $patharray

.keys)

}}"-f $command

,$patharray

[$command

]invoke-expression

-command $funcstr}}

function

set-cmdaliase

foreach

($cmd in $cmdalas

.keys)

}function

set-envpath

}function

set-envparams

foreach

($p in $paramset

.getenumerator())

}function

set-vscmd

pushd

$targetdir

cmd /c "vsdevcmd.bat&set"

|foreach

}popd

}set

-vscmd

set-pathaliase

set-cmdaliase

set-envpath

set-envparams

write-host

"`nset up environment successfully."

-foregroundcolor yellow

ubuntu工作環境配置

ubuntu預設安裝完會有中文輸入法,不知道為什麼把系統語言調為英文後,怎麼切換輸入法都無法輸入中文。最後解決辦法是 在fcitx配置工具input method頁面中,手動新增pinyin或sunpinyin輸入法,而不是預設選擇的keyboard chinese輸入法,不管用。安裝trash c...

linux工作環境搭建

每次重灌 linux 系統後都需要安裝一些必要的軟體,並經過配置後才能達到正常的使用狀態。由於這些步驟都是重複的,並且難於記憶,因此有必要記錄下來,免去一些查詢資料的麻煩。本文將選取 ubuntu12.04 發行版做為描述基礎。使用 sudoapt get install screen 命令安裝 s...

git工作環境配置

git config list相當於 git config local list檢視全域性配置資訊 git config global list配置資訊如下 檢視使用者名稱 git config user.name檢視郵箱 git config user.email 配置使用者名稱 git conf...