mirror of
https://github.com/wfxr/forgit.git
synced 2026-09-10 07:16:23 -04:00
Fix gclean preview for directories
This commit is contained in:
parent
5306146aa1
commit
a5eaff2faa
|
|
@ -471,9 +471,17 @@ _forgit_stash_push() {
|
|||
}
|
||||
|
||||
_forgit_clean_preview() {
|
||||
local file
|
||||
file=$1
|
||||
git diff --color=always /dev/null "$file" | _forgit_pager diff
|
||||
local path
|
||||
path=$1
|
||||
if [[ -d "$path" ]]; then
|
||||
if hash tree &> /dev/null; then
|
||||
tree "$path"
|
||||
else
|
||||
find "$path"
|
||||
fi
|
||||
else
|
||||
git diff --color=always /dev/null "$path" | _forgit_pager diff
|
||||
fi
|
||||
}
|
||||
|
||||
# git clean selector
|
||||
|
|
|
|||
Loading…
Reference in a new issue