LoginSignup
1
1

More than 5 years have passed since last update.

現在いるディレクトリがgit等のVCSで管理されているかチェック&ブランチ名取得

Posted at

zshで.

$ autoload -Uz vcs_info
$ vcs_info # $vcs_info_msg_0_ にVCSの種類とブランチ名が入る
$ echo $vcs_info_msg_0_
 (git)-[master]-
$ echo $VCS_INFO_backends # チェック可能なVCS
bzr cdv cvs darcs fossil git hg mtn p4 svk svn tla
1
1
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
1
1