Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 6, 2025. It is now read-only.

zhuddan/WindowsPowerShell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

21 Commits

Repository files navigation

Project Status: Archived

This project has been archived. Please use the new repository: https://github.com/zhuddan/cmd-config

Microsoft.PowerShell_profile.ps1 配置

使用

  1. 复制 Microsoft.PowerShell_profile.ps1的内容 到 你的配置文件内 即可

    使用 vscode 打开你的配置

    code $PROFILE

    或者使用 txt 打开

    notepad $PROFILE
  2. 复制Microsoft.PowerShell_profile.ps1内容到你的配置文件中并且保存。

  3. 保存之后需要重载你的配置

    . $PROFILE

然后你就可以愉快玩耍了, 记得重新开口终端窗口或者重载你的配置。

命令/别名

  • d/dev
 d # nr dev
 d a # nr dev:a
 d b # nr dev:b
 dev # nr dev
 dev a # nr dev:a
 dev b # nr dev:b
  • w/watch
 w # nr watch
 w a # nr watch:a
 w b # nr watch:b
 watch # nr watch
 watch a # nr watch:a
 watch b # nr watch:b
  • t/test
 t # nr test
 t a # nr test:a
 t b # nr test:b
 test # nr test
 test a # nr test:a
 test b # nr test:b
  • b/build
 b # nr build
 b a # nr build:a
 b b # nr build:b
 build # nr build
 build a # nr build:a
 build b # nr build:b
  • s/server

Note

s/server命令会检查package.jsonserverstart脚本。 并且server的优先级更高。由于start是内置的命令,故别名为server。你可以手动修改Microsoft.PowerShell_profile.ps1调整优先级。

如果你的 package.json 只有 start 脚本

 s # nr start
 s a # nr start:a
 s b # nr start:b
 server # nr start
 server a # nr start:a
 server b # nr start:b

如果你的 package.jsonserver 脚本,此时 start 命令会被忽略。

 s # nr server
 s a # nr server:a
 s b # nr server:b
 server # nr server
 server a # nr server:a
 server b # nr server:b
  • hs (基于http-server的web服务容器,可选参数path为服务路径)
 hs # http-server $output -c-0 --cors
 hs dist # http-server dist $output -c-0 --cors # 此时 http-server 入口为 dist
  • vs (使用vscode打开当前目录, 若存在package.json, 自动使用ni下载依赖)
 vs # vscode 打开当前目录并且自动下载依赖
  • g (git clone的简化操作, 参数repoUrl为仓库地址, 可选参数dir为克隆地址 )
g https://github.com/microsoft/TypeScript # git clone https://github.com/microsoft/TypeScript
g https://github.com/microsoft/TypeScript ts # git clone https://github.com/microsoft/TypeScript ts
  • go (git remote -v别名)
 go # git remote -v
  • cleanup (删除所有node_modules依赖和依赖锁定文件package-lock.json, yarn.lockb, bun.lockb, .pnpm-lock.yaml)
 cleanup # 清理缓存
  • o (打开当前目录)
 o # start .

参考

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /