当前位置: 首页>>代码示例>>Python>>正文


Python colorscheme.get_all_colorschemes方法代码示例

本文整理汇总了Python中ranger.gui.colorscheme.get_all_colorschemes方法的典型用法代码示例。如果您正苦于以下问题:Python colorscheme.get_all_colorschemes方法的具体用法?Python colorscheme.get_all_colorschemes怎么用?Python colorscheme.get_all_colorschemes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ranger.gui.colorscheme的用法示例。


在下文中一共展示了colorscheme.get_all_colorschemes方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: tab

# 需要导入模块: from ranger.gui import colorscheme [as 别名]
# 或者: from ranger.gui.colorscheme import get_all_colorschemes [as 别名]
def tab(self, tabnum):
        from ranger.gui.colorscheme import get_all_colorschemes
        name, value, name_done = self.parse_setting_line()
        settings = self.fm.settings
        if not name:
            return sorted(self.firstpart + setting for setting in settings)
        if not value and not name_done:
            return sorted(self.firstpart + setting for setting in settings
                    if setting.startswith(name))
        if not value:
            # Cycle through colorschemes when name, but no value is specified
            if name == "colorscheme":
                return sorted(self.firstpart + colorscheme for colorscheme
                        in get_all_colorschemes())
            return self.firstpart + str(settings[name])
        if bool in settings.types_of(name):
            if 'true'.startswith(value.lower()):
                return self.firstpart + 'True'
            if 'false'.startswith(value.lower()):
                return self.firstpart + 'False'
        # Tab complete colorscheme values if incomplete value is present
        if name == "colorscheme":
            return sorted(self.firstpart + colorscheme for colorscheme
                    in get_all_colorschemes() if colorscheme.startswith(value)) 
开发者ID:GuidoFe,项目名称:myDotFiles,代码行数:26,代码来源:commands_full.py

示例2: tab

# 需要导入模块: from ranger.gui import colorscheme [as 别名]
# 或者: from ranger.gui.colorscheme import get_all_colorschemes [as 别名]
def tab(self, tabnum):
        from ranger.gui.colorscheme import get_all_colorschemes
        name, value, name_done = self.parse_setting_line()
        settings = self.fm.settings
        if not name:
            return sorted(self.firstpart + setting for setting in settings)
        if not value and not name_done:
            return sorted(self.firstpart + setting for setting in settings \
                    if setting.startswith(name))
        if not value:
            # Cycle through colorschemes when name, but no value is specified
            if name == "colorscheme":
                return sorted(self.firstpart + colorscheme for colorscheme \
                        in get_all_colorschemes())
            return self.firstpart + str(settings[name])
        if bool in settings.types_of(name):
            if 'true'.startswith(value.lower()):
                return self.firstpart + 'True'
            if 'false'.startswith(value.lower()):
                return self.firstpart + 'False'
        # Tab complete colorscheme values if incomplete value is present
        if name == "colorscheme":
            return sorted(self.firstpart + colorscheme for colorscheme \
                    in get_all_colorschemes() if colorscheme.startswith(value)) 
开发者ID:maotora,项目名称:dotfiles,代码行数:26,代码来源:commands_full.py

示例3: tab

# 需要导入模块: from ranger.gui import colorscheme [as 别名]
# 或者: from ranger.gui.colorscheme import get_all_colorschemes [as 别名]
def tab(self):
        from ranger.gui.colorscheme import get_all_colorschemes
        name, value, name_done = self.parse_setting_line()
        settings = self.fm.settings
        if not name:
            return sorted(self.firstpart + setting for setting in settings)
        if not value and not name_done:
            return (self.firstpart + setting for setting in settings \
                    if setting.startswith(name))
        if not value:
            # Cycle through colorschemes when name, but no value is specified
            if name == "colorscheme":
                return (self.firstpart + colorscheme for colorscheme \
                        in get_all_colorschemes())
            return self.firstpart + str(settings[name])
        if bool in settings.types_of(name):
            if 'true'.startswith(value.lower()):
                return self.firstpart + 'True'
            if 'false'.startswith(value.lower()):
                return self.firstpart + 'False'
        # Tab complete colorscheme values if incomplete value is present
        if name == "colorscheme":
            return (self.firstpart + colorscheme for colorscheme \
                    in get_all_colorschemes() if colorscheme.startswith(value)) 
开发者ID:quanttyo,项目名称:dotfiles,代码行数:26,代码来源:commands_full.py


注:本文中的ranger.gui.colorscheme.get_all_colorschemes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。