When displaying USE and other flag output, combines the enabled and
disabled lists into one list and sorts the whole list alphabetically.
.TP
-.BR "\-\-ask " (\fB\-a\fR)
+.BR "\-\-ask [ y | n ] (\-a short option)"
Before performing the action, display what will take place (server info for
\fB\-\-sync\fR, \fB\-\-pretend\fR output for merge, and so forth), then ask
whether to proceed with the action or abort. Using \fB\-\-ask\fR is more
print(" With this option, output such as USE=\"dar -bar -foo\" will instead")
print(" be displayed as USE=\"-bar dar -foo\"")
print()
- print(" "+green("--ask")+" ("+green("-a")+" short option)")
+ print(" " + green("--ask") + \
+ " [ %s | %s ] (%s short option)" % \
+ (turquoise("y"), turquoise("n"), green("-a")))
desc = "Before performing the action, display what will take place (server info for " + \
"--sync, --pretend output for merge, and so forth), then ask " + \
"whether to proceed with the action or abort. Using --ask is more " + \
long = int
options=[
-"--ask", "--alphabetical",
+"--alphabetical",
"--ask-enter-invalid",
"--buildpkgonly",
"--changed-use",
shortmapping={
"1":"--oneshot",
-"a":"--ask",
"B":"--buildpkgonly",
"c":"--depclean",
"C":"--unmerge",
new_args = []
default_arg_opts = {
+ '--ask' : y_or_n,
'--autounmask' : y_or_n,
'--buildpkg' : y_or_n,
'--complete-graph' : y_or_n,
# Don't make things like "-kn" expand to "-k n"
# since existence of -n makes it too ambiguous.
short_arg_opts_n = {
+ 'a' : y_or_n,
'b' : y_or_n,
'g' : y_or_n,
'G' : y_or_n,
true_y = ("True", "y")
argument_options = {
+ "--ask": {
+ "shortopt" : "-a",
+ "help" : "prompt before performing any actions",
+ "type" : "choice",
+ "choices" : true_y_or_n
+ },
+
"--autounmask": {
"help" : "automatically unmask packages",
"type" : "choice",
myoptions, myargs = parser.parse_args(args=tmpcmdline)
+ if myoptions.ask in true_y:
+ myoptions.ask = True
+ else:
+ myoptions.ask = None
+
if myoptions.autounmask in true_y:
myoptions.autounmask = True