Add files command
This commit is contained in:
parent
17d5888ac8
commit
b9c23f3d68
12
guzzy/commands/files.sh
Executable file
12
guzzy/commands/files.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
[ "$1" ] && commit_hash="$1" || commit_hash="HEAD"
|
||||||
|
|
||||||
|
commit="git --no-pager show -q $commit_hash"
|
||||||
|
limiter="-------------------------------------------------"
|
||||||
|
|
||||||
|
file_content="git show $commit_hash:{}"
|
||||||
|
|
||||||
|
git ls-tree -r --name-only "$commit_hash" |
|
||||||
|
fzf --ansi --preview "$commit && echo $limiter && $file_content" \
|
||||||
|
--preview-window=right:70%
|
Loading…
x
Reference in New Issue
Block a user