diff options
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 |