Пример #1
0
    def configure_pager(self):
        # Provide sane defaults for less.
        os.environ['LESS'] = '-RXF'

        cnf = self.read_my_cnf_files(self.cnf_files, ['pager', 'skip-pager'])
        if cnf['pager']:
            special.set_pager(cnf['pager'])
        if cnf['skip-pager']:
            special.disable_pager()
Пример #2
0
    def configure_pager(self):
        # Provide sane defaults for less.
        os.environ['LESS'] = '-SRXF'

        cnf = self.read_my_cnf_files(self.cnf_files, ['pager', 'skip-pager'])
        if cnf['pager']:
            special.set_pager(cnf['pager'])
        if cnf['skip-pager']:
            special.disable_pager()
Пример #3
0
    def configure_pager(self):
        # Provide sane defaults for less.
        os.environ["LESS"] = "-RXF"

        cnf = self.read_my_cnf_files(self.cnf_files, ["pager", "skip-pager"])
        if cnf["pager"]:
            special.set_pager(cnf["pager"])
        if cnf["skip-pager"]:
            special.disable_pager()
Пример #4
0
    def configure_pager(self):
        # Provide sane defaults for less if they are empty.
        if not os.environ.get('LESS'):
            os.environ['LESS'] = '-RXF'

        cnf = self.read_my_cnf_files(self.cnf_files, ['pager', 'skip-pager'])
        if cnf['pager']:
            special.set_pager(cnf['pager'])
            self.explicit_pager = True
        else:
            self.explicit_pager = False

        if cnf['skip-pager']:
            special.disable_pager()
Пример #5
0
    def configure_pager(self):
        # Provide sane defaults for less if they are empty.
        if not os.environ.get('LESS'):
            os.environ['LESS'] = '-RXF'

        cnf = self.read_my_cnf_files(self.cnf_files, ['pager', 'skip-pager'])
        if cnf['pager']:
            special.set_pager(cnf['pager'])
            self.explicit_pager = True
        else:
            self.explicit_pager = False

        if cnf['skip-pager'] or not self.config['main'].as_bool('enable_pager'):
            special.disable_pager()
Пример #6
0
 def set_pager_from_config(self):
     cnf = self.read_my_cnf_files(self.cnf_files, ['pager', 'skip-pager'])
     if cnf['pager']:
         special.set_pager(cnf['pager'])
     if cnf['skip-pager']:
         special.disable_pager()
Пример #7
0
 def set_pager_from_config(self):
     cnf = self.read_my_cnf_files(self.cnf_files, ["pager", "skip-pager"])
     if cnf["pager"]:
         special.set_pager(cnf["pager"])
     if cnf["skip-pager"]:
         special.disable_pager()