Example #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()
Example #2
0
File: main.py Project: Hsuing/mycli
    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()
Example #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()
Example #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()
Example #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()
Example #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()
Example #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()