Any executable script on you PATH that is named `git-some-name` will be available as a git subcommand, which means you could do `git some-name` to run the script. Git adds them to `git help -a` under the title "git commands available from elsewhere on your $PATH", which will then power the auto completion, so that will also work for any command you add. http://blog.zamith.pt/blog/2014/11/05/supercharging-your-git/ Examples of other projects that structure their dotfiles like this: https://github.com/robbyrussell/oh-my-zsh https://github.com/tj/git-extras https://github.com/holman/dotfiles
5 lines
51 B
Bash
Executable file
5 lines
51 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
git rev-parse --abbrev-ref HEAD
|