fish: functions/gl: Fix object ID ambiguous error
7 digit hash is sometimes not enough to correctly show the commit.
This commit is contained in:
parent
cf4d2ea2b4
commit
135d59f37c
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@ function gl --description 'Git browse commits'
|
|||
return 0
|
||||
end
|
||||
|
||||
set -l log_line_to_hash "echo {} | grep -o '[a-f0-9]\{7\}' | head -1"
|
||||
set -l log_line_to_hash "echo {} | grep -o '[a-f0-9]\{9\}' | head -1"
|
||||
set -l view_commit "$log_line_to_hash | xargs -I % sh -c 'git show --color=always % | bat -ldiff'"
|
||||
set -l view_commit_nvim "$log_line_to_hash | xargs -I % sh -c 'git show %'"
|
||||
set -l copy_commit_hash "$log_line_to_hash | wl-copy"
|
||||
|
|
Loading…
Reference in a new issue