Skip to content

Commit 2878804

Browse files
authored
Merge pull request #210 from unixorn/fix-git-fzf-log-browser
Add missing `has` function to `git-fzf-log-browser`
2 parents 5e3e945 + 8e0f5ac commit 2878804

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bin/git-fzf-log-browser

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ fail() {
1212
exit "${2-1}" ## Return a code specified by $2 or 1 by default.
1313
}
1414

15+
function has() {
16+
which "$@" > /dev/null 2>&1
17+
}
18+
1519
git-fzf-log-browser() {
1620
selections=$(
1721
git log --graph --format="%C(yellow)%h%C(red)%d%C(reset) - %C(bold green)(%ar)%C(reset) %s %C(blue)<%an>%C(reset)" --color=always "$@" |

0 commit comments

Comments
 (0)