diff options
author | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2016-07-03 11:10:51 -0400 |
---|---|---|
committer | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2016-07-03 11:10:51 -0400 |
commit | 0f94d841cc2c1be57c16b08e3393820c99c09fe8 (patch) | |
tree | 02cd36ddf3f923f8adb674813ba06f7be221c4c1 /config/fish/functions/__parse_git_branch.fish | |
parent | c800c122a1405ad89ce874d03ea305438bc227e3 (diff) | |
parent | 26e338a9aed83229eb0e18cc597d51f09dd07cf3 (diff) |
Merge branch 'master' of sabaki.kk.orbekk.com:/storage/projects/dotfiles
Diffstat (limited to 'config/fish/functions/__parse_git_branch.fish')
-rw-r--r-- | config/fish/functions/__parse_git_branch.fish | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/config/fish/functions/__parse_git_branch.fish b/config/fish/functions/__parse_git_branch.fish new file mode 100644 index 0000000..42b46fb --- /dev/null +++ b/config/fish/functions/__parse_git_branch.fish @@ -0,0 +1,4 @@ +function __parse_git_branch -d "Parse current Git branch name" + command git symbolic-ref --short HEAD ^/dev/null; + or command git show-ref --head -s --abbrev | head -n1 ^/dev/null +end |