mirror of
https://github.com/asciinema/asciinema.git
synced 2025-12-16 11:48:13 +01:00
Ability to set -q option in config file
This commit is contained in:
@@ -185,6 +185,7 @@ available options set:
|
|||||||
command = /bin/bash -l
|
command = /bin/bash -l
|
||||||
maxwait = 2
|
maxwait = 2
|
||||||
yes = true
|
yes = true
|
||||||
|
quiet = true
|
||||||
|
|
||||||
[play]
|
[play]
|
||||||
maxwait = 1
|
maxwait = 1
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ For help on a specifc command run:
|
|||||||
parser_rec.add_argument('-t', '--title', help='title of the asciicast')
|
parser_rec.add_argument('-t', '--title', help='title of the asciicast')
|
||||||
parser_rec.add_argument('-w', '--max-wait', help='limit recorded terminal inactivity to max <sec> seconds (can be fractional)', type=positive_float, default=maybe_str(cfg.record_max_wait))
|
parser_rec.add_argument('-w', '--max-wait', help='limit recorded terminal inactivity to max <sec> seconds (can be fractional)', type=positive_float, default=maybe_str(cfg.record_max_wait))
|
||||||
parser_rec.add_argument('-y', '--yes', help='answer "yes" to all prompts (e.g. upload confirmation)', action='store_true', default=cfg.record_yes)
|
parser_rec.add_argument('-y', '--yes', help='answer "yes" to all prompts (e.g. upload confirmation)', action='store_true', default=cfg.record_yes)
|
||||||
parser_rec.add_argument('-q', '--quiet', help='be quiet, suppress all notices/warnings (implies -y)', action='store_true')
|
parser_rec.add_argument('-q', '--quiet', help='be quiet, suppress all notices/warnings (implies -y)', action='store_true', default=cfg.record_quiet)
|
||||||
parser_rec.add_argument('filename', nargs='?', default='')
|
parser_rec.add_argument('filename', nargs='?', default='')
|
||||||
parser_rec.set_defaults(func=rec_command)
|
parser_rec.set_defaults(func=rec_command)
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,10 @@ class Config:
|
|||||||
def record_yes(self):
|
def record_yes(self):
|
||||||
return self.config.getboolean('record', 'yes', fallback=False)
|
return self.config.getboolean('record', 'yes', fallback=False)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def record_quiet(self):
|
||||||
|
return self.config.getboolean('record', 'quiet', fallback=False)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def play_max_wait(self):
|
def play_max_wait(self):
|
||||||
return self.config.getfloat('play', 'maxwait', fallback=None)
|
return self.config.getfloat('play', 'maxwait', fallback=None)
|
||||||
|
|||||||
Reference in New Issue
Block a user