[darcs-devel] [issue2525] help|setpref --list-options only take into account the command itself (none of the arguments given)
Gian Piero Carrubba
bugs at darcs.net
Thu Mar 9 08:33:19 UTC 2017
New submission from Gian Piero Carrubba <gpiero at rm-rf.it>:
$ darcs setpref --list-options | egrep '^[^-]'
test
predist
boringfile
binariesfile
So far, so good.
$ darcs setpref test --list-options | egrep '^[^-]'
test
predist
boringfile
binariesfile
Now these completions aren't very useful, as darcs would refuse setting
2 prefs in the same run.
Compare this with the behaviour of, i.e., convert, where --list-options
is context aware:
$ darcs convert --list-options | egrep '^[^-]'
darcs-2
export
import
$ darcs convert darcs-2 --list-options | egrep '^[^-]'
(none)
I would say that the difference is due to the fact that convert is a
2-level command, while setpref is a single level command that accepts an
argument. Nevertheless, they should behave similarly for completion
purposes. [0]
'help' is similar to 'setpref', but it should also take into account if
the command given as argument is a 2-level one. I.e.:
$ darcs help convert --list-options | egrep '^[^-]'
should output:
darcs-2
export
import
while
$ darcs help convert darcs-2 --list-options
should only print options.
Thanks,
Gian Piero.
[0] As a side note while I'm on it: --list-options given on level 1 of a
2-level command should probably list itself. Now it doesn't:
$ darcs optimize --list-options | fgrep -- --list-options
(none)
=== darcs version ===
2.13.0 (unknown)
darcs compiled on Mar 8 2017, at 12:39:08
Context:
[fixed a todo comment regarding email encoding
Ben Franksen <benjamin.franksen at helmholtz-berlin.de>**20170226184130
Ignore-this: 8c9d810433046cbe6880a5a62b955adb
What qpencode does is indeed MIME Quoted Printable encoding.
]
Weak Hash: 8557abff42624c4c34db3b9e7528a97d92805003
----------
messages: 19356
nosy: gpiero
status: unknown
title: help|setpref --list-options only take into account the command itself (none of the arguments given)
__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue2525>
__________________________________
More information about the darcs-devel
mailing list