mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-06-13 19:58:03 +02:00
51276: Fix diff completion for non GNU / FreeBSD platforms
On OpenBSD, "diff -urpN dir1/ di<TAB>" would refuse to complete a second filename/directory name. This was caused by the -u and -U options getting dropped from args (overwriting args vs appending).
This commit is contained in:
parent
81684e334d
commit
996b515156
2 changed files with 31 additions and 15 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2023-01-10 Oliver Kiddle <opk@zsh.org>
|
||||||
|
|
||||||
|
* Nathan Houghton: 51276: Completion/Unix/Type/_diff_options:
|
||||||
|
Fix diff completion for non GNU / FreeBSD platforms
|
||||||
|
|
||||||
2023-01-08 Daniel Shahaf <d.s@daniel.shahaf.name>
|
2023-01-08 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||||
|
|
||||||
* unposted: Src/Zle/zle_refresh.c: In a comment, replace a C
|
* unposted: Src/Zle/zle_refresh.c: In a comment, replace a C
|
||||||
|
|
|
@ -133,33 +133,44 @@ else
|
||||||
case $OSTYPE in
|
case $OSTYPE in
|
||||||
openbsd*|solaris2.<9->)
|
openbsd*|solaris2.<9->)
|
||||||
of+=' -u -U'
|
of+=' -u -U'
|
||||||
|
;|
|
||||||
|
openbsd*|solaris*)
|
||||||
|
of+=' -n -C -D'
|
||||||
|
;|
|
||||||
|
solaris*)
|
||||||
|
of+=' -h'
|
||||||
|
;|
|
||||||
|
openbsd*)
|
||||||
|
of+=' -q'
|
||||||
|
;|
|
||||||
|
# modifications to "$of" should be done above this line so that it is
|
||||||
|
# uniformly defined while constructing $args
|
||||||
|
openbsd*|solaris2.<9->)
|
||||||
args+=(
|
args+=(
|
||||||
"($of)-u[output a unified diff]"
|
"($of)-u[output a unified diff]"
|
||||||
"($of)-U+[output a unified diff]:lines of context"
|
"($of)-U+[output a unified diff]:lines of context"
|
||||||
)
|
)
|
||||||
;|
|
;|
|
||||||
openbsd*|solaris*)
|
openbsd*|solaris*)
|
||||||
args+=(
|
args+=(
|
||||||
"($of)-C+[output a context diff]:lines of context"
|
"($of)-C+[output a context diff]:lines of context"
|
||||||
"($of)-D+[output merged file with preprocessor directives]:preprocessor symbol"
|
"($of)-D+[output merged file with preprocessor directives]:preprocessor symbol"
|
||||||
'-i[case insensitive]'
|
'-i[case insensitive]'
|
||||||
'-l[long output format (paginate with pr(1))]'
|
'-s[report on identical files]'
|
||||||
'-s[report on identical files]'
|
'-t[expand tabs in output lines]'
|
||||||
'-t[expand tabs in output lines]'
|
|
||||||
)
|
)
|
||||||
;|
|
;|
|
||||||
solaris*)
|
solaris*)
|
||||||
of+=' -h -n'
|
|
||||||
args+=(
|
args+=(
|
||||||
'-w[ignore all white space]'
|
'-w[ignore all white space]'
|
||||||
"($of)-h[do a fast, half-hearted job]"
|
"($of)-h[do a fast, half-hearted job]"
|
||||||
"($of)-n[output a reversed ed script]"
|
"($of)-n[output a reversed ed script]"
|
||||||
'-S+[set first file in comparison]:start with file:_files'
|
'-S+[set first file in comparison]:start with file:_files'
|
||||||
|
'-l[long output format (paginate with pr(1))]'
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
openbsd*)
|
openbsd*)
|
||||||
of+=' -n -q -u -C -D -U'
|
args+=(
|
||||||
args=(
|
|
||||||
"($of)-n[output an rcsdiff(1)-compatible diff]"
|
"($of)-n[output an rcsdiff(1)-compatible diff]"
|
||||||
"($of)-q[only print a line when the files differ; does not produce a list of changes]"
|
"($of)-q[only print a line when the files differ; does not produce a list of changes]"
|
||||||
'-a[treat all files as ASCII text]'
|
'-a[treat all files as ASCII text]'
|
||||||
|
@ -173,7 +184,7 @@ else
|
||||||
'-P[treat absent files in the second directory as if they were empty]'
|
'-P[treat absent files in the second directory as if they were empty]'
|
||||||
'-S[start a directory diff from a file name]:file name:_files'
|
'-S[start a directory diff from a file name]:file name:_files'
|
||||||
'*-X[exclude files and subdirectories whose basenames match lines in a file]:file name:_files'
|
'*-X[exclude files and subdirectories whose basenames match lines in a file]:file name:_files'
|
||||||
'-x[exclude files and subdirectories whose basenames match a pattern]:pattern'
|
'*-x[exclude files and subdirectories whose basenames match a pattern]:pattern'
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue