* Re: Silly questions about _arguments & Co (and probably bugs)
@ 1999-09-09 13:55 Sven Wischnowsky
1999-09-09 14:05 ` Andrej Borsenkow
1999-09-09 15:15 ` Andrej Borsenkow
0 siblings, 2 replies; 6+ messages in thread
From: Sven Wischnowsky @ 1999-09-09 13:55 UTC (permalink / raw)
To: zsh-workers
Andrej Borsenkow wrote:
> 1. When are the description of arguments actually printed? I tried some basic
> commands like xterm or patch but descriptions do not seem to be printed.
You need to do `compconf description_format="--- %d"' or something
like that.
> 2. Looks, like `-s' is overloaded - it is used both for "single letter options"
> and for "option aliases" (from _long_options). I believe, this is the reason why
> option aliases do not work any more :-) E.g. ntpd configure lists only --enable
> variant - and now no --disable counterparts are recognised.
No, the `-s' for the long-option stuff is *only* interpreted if it
appears *after* the `--', which needs to be there to make `_arguments'
do this automatic-long-option-stuff at all. The `-s' for `use single
letter options' has to come as the *first* argument.
> 3. I cannot make completion for patch work. As simple as `patch --sTAB' just
> beeps.
Dunno, works for me.
> 4. `patch -pTAB' gives me `patch -p0 ' - but `0' is not autoremoved if I enter
> different number (I'd expect it to be).
I don't get a `0' inserted automatically here.
> 5. `patch TAB' does not list most of the long options at all. Actually, it is
> interesting case - if a command has both long and short form - which one should
> be preferred? I'd like to have short option only if no corresponding short one
> exists.
Again, I get all the long options my `patch --help' prints. Hm, this
and the `--s<TAB>' thing above makes me think that maybe you have a
different version of `patch' with a different `--help' output. I'd
need to see that then.
Otherwise: which version do you have? Which patches?
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Silly questions about _arguments & Co (and probably bugs)
1999-09-09 13:55 Silly questions about _arguments & Co (and probably bugs) Sven Wischnowsky
@ 1999-09-09 14:05 ` Andrej Borsenkow
1999-09-09 15:15 ` Andrej Borsenkow
1 sibling, 0 replies; 6+ messages in thread
From: Andrej Borsenkow @ 1999-09-09 14:05 UTC (permalink / raw)
To: Sven Wischnowsky, zsh-workers
>
> > 2. Looks, like `-s' is overloaded - it is used both for "single
> letter options"
> > and for "option aliases" (from _long_options). I believe, this is
> the reason why
> > option aliases do not work any more :-) E.g. ntpd configure lists
> only --enable
> > variant - and now no --disable counterparts are recognised.
>
> No, the `-s' for the long-option stuff is *only* interpreted if it
> appears *after* the `--', which needs to be there to make `_arguments'
> do this automatic-long-option-stuff at all. The `-s' for `use single
> letter options' has to come as the *first* argument.
>
O.K., I overlooked it (not that I like it either). But, still, aliasing does not
work any more. Just try
./configure --dis-z-m
It should complete to --disable-zsh-memory - but it does not.
>
> Otherwise: which version do you have? Which patches?
>
3.1.6-pws-3 with patches up to 7740 (including 2576,2578 from zsh-users).
patch-2.5.3. Help output looks like:
bor@itsrm2:/tools/src/zsh-3.1.6-pws-3%> patch --help
Usage: patch [OPTION]... [ORIGFILE [PATCHFILE]]
Input options:
-p NUM --strip=NUM Strip NUM leading components from file names.
-F LINES --fuzz LINES Set the fuzz factor to LINES for inexact matching.
-l --ignore-whitespace Ignore white space changes between patch and input.
-c --context Interpret the patch as a context difference.
-e --ed Interpret the patch as an ed script.
-n --normal Interpret the patch as a normal difference.
-u --unified Interpret the patch as a unified difference.
-N --forward Ignore patches that appear to be reversed or already applied.
-R --reverse Assume patches were created with old and new files swapped.
-i PATCHFILE --input=PATCHFILE Read patch from PATCHFILE instead of stdin.
Output options:
-o FILE --output=FILE Output patched files to FILE.
-r FILE --reject-file=FILE Output rejects to FILE.
-D NAME --ifdef=NAME Make merged if-then-else output using NAME.
-E --remove-empty-files Remove output files that are empty after patching.
-Z --set-utc Set times of patched files, assuming diff uses UTC (GMT).
-T --set-time Likewise, assuming local time.
--quoting-style=WORD output file names using quoting style WORD.
Valid WORDs are: literal, shell, shell-always, c, escape.
Default is taken from QUOTING_STYLE env variable, or 'shell' if unset.
Backup and version control options:
-b --backup Back up the original contents of each file.
--backup-if-mismatch Back up if the patch does not match exactly.
--no-backup-if-mismatch Back up mismatches only if otherwise requested.
-V STYLE --version-control=STYLE Use STYLE version control.
STYLE is either 'simple', 'numbered', or 'existing'.
-B PREFIX --prefix=PREFIX Prepend PREFIX to backup file names.
-Y PREFIX --basename-prefix=PREFIX Prepend PREFIX to backup file basenames.
-z SUFFIX --suffix=SUFFIX Append SUFFIX to backup file names.
-g NUM --get=NUM Get files from RCS etc. if positive; ask if negative.
Miscellaneous options:
-t --batch Ask no questions; skip bad-Prereq patches; assume reversed.
-f --force Like -t, but ignore bad-Prereq patches, and assume unreversed.
-s --quiet --silent Work silently unless an error occurs.
--verbose Output extra information about the work being done.
--dry-run Do not actually change any files; just print what would happen.
--posix Conform to the POSIX standard.
-d DIR --directory=DIR Change the working directory to DIR first.
--binary Read and write data in binary mode (no effect on this platform).
-v --version Output version info.
--help Output this help.
Report bugs to <bug-gnu-utils@gnu.org>.
/andrej
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Silly questions about _arguments & Co (and probably bugs)
1999-09-09 13:55 Silly questions about _arguments & Co (and probably bugs) Sven Wischnowsky
1999-09-09 14:05 ` Andrej Borsenkow
@ 1999-09-09 15:15 ` Andrej Borsenkow
1999-09-09 15:44 ` Tanaka Akira
1999-09-09 16:04 ` CVS and patch Bart Schaefer
1 sibling, 2 replies; 6+ messages in thread
From: Andrej Borsenkow @ 1999-09-09 15:15 UTC (permalink / raw)
To: zsh-workers
>
> > 3. I cannot make completion for patch work. As simple as `patch --sTAB' just
> > beeps.
>
> Dunno, works for me.
>
This works now. Most probably, it was the 7750 that did the trick.
BTW I find the --use-index-line really useful. I have constant problems with
cvs-generated patches - either index line is ignored (non-POSIX) or new files
are not created (POSIX). Anybody knows, how to fix it in pure patch?
cheers
/andrej
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Silly questions about _arguments & Co (and probably bugs)
1999-09-09 15:15 ` Andrej Borsenkow
@ 1999-09-09 15:44 ` Tanaka Akira
1999-09-09 16:02 ` More _patch problems " Andrej Borsenkow
1999-09-09 16:04 ` CVS and patch Bart Schaefer
1 sibling, 1 reply; 6+ messages in thread
From: Tanaka Akira @ 1999-09-09 15:44 UTC (permalink / raw)
To: zsh-workers
In article <000301befad6$1d396a80$21c9ca95@mow.siemens.ru>,
"Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru> writes:
> BTW I find the --use-index-line really useful. I have constant problems with
> cvs-generated patches - either index line is ignored (non-POSIX) or new files
> are not created (POSIX). Anybody knows, how to fix it in pure patch?
Remove the following lines in pch.c.
if (! posixly_correct && (name[OLD] || name[NEW]) && name[INDEX])
{
free (name[INDEX]);
name[INDEX] = 0;
}
In article <000401befad6$ad291a50$21c9ca95@mow.siemens.ru>,
"Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru> writes:
> Running under dtterm with 24x80 size and doing
>
> patch TAB
>
> creates a select listing longer than screen size. At least, if I do it in a
> directory with ~ 15 files.
I think `compconf option_prefix=all' is useful.
And, I found another problem. `patch -f<TAB>' does not show list of
completion candidates. However completion itself works well.
is27e1u11% bindkey -e; fpath=($PWD/Completion/*(/)); autoload -U compinit; compinit -D; compdef _tst tst
is27e1u11% compconf group_matches=yes message_format='%d' description_format='%d' describe_options=yes
is27e1u11% patch -f<TAB>
option
is27e1u11% set -x
is27e1u11% patch -f<TAB>
...
+_display:31> compadd -D _arr - --backup-if-mismatch --backup --basename-prefix --batch --binary --context --directory --dry-run --ed --force --forward --fuzz --get --help --ifdef --ignore-whitespace --input --no-backup-if-mismatch --normal --output --patch-root --posix --prefix --quiet --quoting-style --reject-file --remove-empty-files --reverse --set-time --set-utc --strip --suffix --unified --use-index-line --verbose --version-control --version -B -D -E -F -N -R -S -T -V -Y -Z -b -d -g -i -l -n -p -s -t -u -v -z
+_display:33> [[ o != ( ]]
+_display:33> eval odescr=( "$_arr[@]" )
+_display:33> odescr=( )
+_display:35> (( 0 ))
+_display:79> eval tmp=''
+_display:79> tmp=
+_display:80> return 1
+_arguments:826> compadd -J option -X option -Q -M r:|[_-]=* r:|=* -y tmp - -fR -fS -fT -fZ -fb -fl -fn -fs -ft -fu -fv -fE -fN -fB -fd -fD -fV -fg -fF -fi -fz -fY -fp
...
+_main_complete:101> return ret
option
So, I think this is the problem of `_display'.
--
Tanaka Akira
^ permalink raw reply [flat|nested] 6+ messages in thread
* More _patch problems RE: Silly questions about _arguments & Co (and probably bugs)
1999-09-09 15:44 ` Tanaka Akira
@ 1999-09-09 16:02 ` Andrej Borsenkow
0 siblings, 0 replies; 6+ messages in thread
From: Andrej Borsenkow @ 1999-09-09 16:02 UTC (permalink / raw)
To: Tanaka Akira, zsh-workers
>
> And, I found another problem. `patch -f<TAB>' does not show list of
> completion candidates. However completion itself works well.
>
In my case `patch --in=/' does not work either.
bor@itsrm2:~%> zsh -f
itsrm2% autoload compinit; compinit -D
itsrm2% patch --in=/<TAB>
itsrm2% patch --input=/<TAB>
B-e-e-p
This is 3.1.6-pws-3 with patches up to 7750
Note that both --dir or --output work; even `-i TAB' works as expected.
/andrej
^ permalink raw reply [flat|nested] 6+ messages in thread
* CVS and patch
1999-09-09 15:15 ` Andrej Borsenkow
1999-09-09 15:44 ` Tanaka Akira
@ 1999-09-09 16:04 ` Bart Schaefer
1 sibling, 0 replies; 6+ messages in thread
From: Bart Schaefer @ 1999-09-09 16:04 UTC (permalink / raw)
To: zsh-workers
On Sep 9, 7:15pm, Andrej Borsenkow wrote:
} Subject: RE: Silly questions about _arguments & Co (and probably bugs)
}
} I have constant problems with
} cvs-generated patches - either index line is ignored (non-POSIX) or new files
} are not created (POSIX). Anybody knows, how to fix it in pure patch?
If there were a way to fix it with pure patch, I don't think Tanaka would
have written a patch for patch.
If you use "cvs patch" (aka "cvs rdiff") instead of "cvs diff", the output
is much more patch-friendly; but you need two tagged revisions for that to
be very useful. I have no idea why the CVS developers didn't make diff do
the same output format as rdiff.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~1999-09-09 16:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-09 13:55 Silly questions about _arguments & Co (and probably bugs) Sven Wischnowsky
1999-09-09 14:05 ` Andrej Borsenkow
1999-09-09 15:15 ` Andrej Borsenkow
1999-09-09 15:44 ` Tanaka Akira
1999-09-09 16:02 ` More _patch problems " Andrej Borsenkow
1999-09-09 16:04 ` CVS and patch Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).