pff: cosmetic
This commit is contained in:
parent
9eaed33548
commit
86963ec09f
14
pff
14
pff
|
@ -998,7 +998,7 @@ function edit_cmd() {
|
|||
function diff_cmd() {
|
||||
local list_names="$1"; shift
|
||||
|
||||
local pffdir profile srcp destp
|
||||
local pffdir profile srcp destp desc
|
||||
case $# in
|
||||
0)
|
||||
ensure_pffdir pffdir
|
||||
|
@ -1033,6 +1033,16 @@ function diff_cmd() {
|
|||
destp="$2"
|
||||
;;
|
||||
esac
|
||||
[ "$destp" == "Common|Base" ] && destp=
|
||||
if [ -z "$destp" ]; then
|
||||
if [ "$srcp" == Base -o "$srcp" == Common ]; then
|
||||
desc="pff --diff $srcp Base"
|
||||
else
|
||||
desc="pff --diff $srcp ${destp:-"Common|Base"}"
|
||||
fi
|
||||
else
|
||||
desc="pff --diff $srcp $destp"
|
||||
fi
|
||||
|
||||
local -a lfiles; local rfile bfile Cfile srcfile destfile
|
||||
setx -a lfiles=get_local_files "$pffdir"
|
||||
|
@ -1058,6 +1068,8 @@ function diff_cmd() {
|
|||
if [ -n "$list_names" ]; then
|
||||
diff -q "$srcfile" "$destfile" >&/dev/null || echo "$srcfile"
|
||||
else
|
||||
[ -n "$desc" ] && echo "$desc"
|
||||
desc=
|
||||
diff -ur "$srcfile" "$destfile"
|
||||
fi
|
||||
done | page_maybe
|
||||
|
|
Loading…
Reference in New Issue