def quote_for_shell(s):
    returned = s.replace("\\", "\\\\").replace('"', '\\"').replace("$", "\\$")
    if " " in returned:
        returned = '"%s"' % returned
    return returned
Register an object to receive event notifications for the given
dataset/ETHPy150Open CouchPotato/CouchPotatoServer/libs/git/utils.py/quote_for_shell--crossover with--dataset/ETHPy150Open anandology/pyjamas/library/gwt/DOM.py/setEventListener