Commit 03661ed0 authored by Seblu's avatar Seblu
Browse files

fix roxterm bad handling \0001 and \0002

parent 90ab166c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ class Cli(object):
    def _parse(self):
        '''Parse a line'''
        if self.interactive:
            prompt = "%s%s>%s "%(color["lwhite"],self.settings["login"],color["reset"])
            prompt = "\001%s\002%s>\001%s\002 "%(color["light"],self.settings["login"],color["reset"])
        else:
            prompt = ""
        while True:
+2 −0
Original line number Diff line number Diff line
@@ -176,6 +176,8 @@ class Command(object):
            objs = self.cli.rpc.list(str.join("", argv[1:]))
        except RpcError as e:
            raise cmdError("RPCError: %s"%str(e))
        if len(objs) == 0:
            return
        # get all tag list
        tags = dict()
        for o in objs:
+22 −21
Original line number Diff line number Diff line
@@ -14,30 +14,31 @@ from cccli.exception import *

color = {
    # regular
    "red": "\001\033[0;31m\002",
    "green": "\001\033[0;32m\002",
    "yellow": "\001\033[0;33m\002",
    "blue": "\001\033[0;34m\002",
    "purple": "\001\033[0;35m\002",
    "cyan": "\001\033[0;36m\002",
    "white": "\001\033[0;37m\002",
    "red": "\033[0;31m",
    "green": "\033[0;32m",
    "yellow": "\033[0;33m",
    "blue": "\033[0;34m",
    "purple": "\033[0;35m",
    "cyan": "\033[0;36m",
    "white": "\033[0;37m",
    # lighted
    "lred": "\001\033[1;31m",
    "lgreen": "\001\033[1;32m\002",
    "lyellow": "\001\033[1;33m\002",
    "lblue": "\001\033[1;34m\002",
    "lpurple": "\001\033[1;35m\002",
    "lcyan": "\001\033[1;36m\002",
    "lwhite": "\001\033[1;37m\002",
    "lred": "\033[1;31m",
    "lgreen": "\033[1;32m",
    "lyellow": "\033[1;33m",
    "lblue": "\033[1;34m",
    "lpurple": "\033[1;35m",
    "lcyan": "\033[1;36m",
    "lwhite": "\033[1;37m",
    # underline
    "ured": "\001\033[4;31m\002",
    "ugreen": "\001\033[4;32m\002",
    "uyellow": "\001\033[4;33m\002",
    "ublue": "\001\033[4;34m\002",
    "upurple": "\001\033[4;35m\002",
    "ucyan": "\001\033[4;36m\002",
    "ured": "\033[4;31m",
    "ugreen": "\033[4;32m",
    "uyellow": "\033[4;33m",
    "ublue": "\033[4;34m",
    "upurple": "\033[4;35m",
    "ucyan": "\033[4;36m",
    # others
    "reset": "\001\033[m\002",
    "light": "\033[1m",
    "reset": "\033[m",
    }