summaryrefslogtreecommitdiff
path: root/old/config/fish/functions/__parse_git_branch.fish
diff options
context:
space:
mode:
Diffstat (limited to 'old/config/fish/functions/__parse_git_branch.fish')
-rw-r--r--old/config/fish/functions/__parse_git_branch.fish4
1 files changed, 4 insertions, 0 deletions
diff --git a/old/config/fish/functions/__parse_git_branch.fish b/old/config/fish/functions/__parse_git_branch.fish
new file mode 100644
index 0000000..42b46fb
--- /dev/null
+++ b/old/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