LoginSignup
0
0

20240406 powershellのlsを色付きの`ls --color=auto -F`にする、starshipでposh-gitを置き換えたい

Last updated at Posted at 2024-04-06

powershellのlsを色付けにした話

Powershellの各種コマンドをcoreutilsで置き換えてかなり満足だったが、lsの出力だけが気に食わない

この貧相っぷりである

image.png
普通ls -F --color=autoのaliasを作るのだが、Powershellではオプション付けてaliasにするのがめんどい
こんな風にしてうまくいった

function _ls() {
  if ($args.Length -eq 0) {
    uutils ls -F --color=auto
  } else {
    uutils ls -F --color=auto $args
  }
}
Set-Alias ls _ls -Option AllScope

出力結果、なんとも見慣れた雰囲気になって落ち着く
image.png

starshipでposh-gitを置き換えたい

starshipはたぶんすごく早いはずなので、今のposh-gitを置き換えたいと考えている
posh-gitのプロンプト
image.png

starshipのプロンプト
image.png

gitのステータスをもうちょっと細かく表示してくれるとうれしい

0
0
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
0
0