LoginSignup
3
4

More than 3 years have passed since last update.

PowerShellのプロンプトが長い

Posted at

Windows を常用していると、PowerShell のプロンプトが長くて(カレントディレクトリが深くて)見づらくなってしまうことがありますね。
よく訓練されたWindowsユーザーは、息を吐くように以下のコマンドを実行します。

function prompt { "PS> " }

もっと凝ったこともできますが、そういうのは $profile に入れておきましょう。
これは他人のPCを触ることが多い人やWindowsサーバの管理者のための方法です。

ちなみにコマンドプロンプトでは以下のようにします。

prompt $G
3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4