~marcosvanetta/stipple/stipple-new-pluginbase

« back to all changes in this revision

Viewing changes to plugins/zsh.py

  • Committer: Marcos Vanetta
  • Date: 2010-05-15 15:42:07 UTC
  • Revision ID: marcosvanetta@gmail.com-20100515154207-ck0bvkd6ilwmyica
reparing bash, bzr, emacs and vim plugins

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
# -*- coding: utf-8 -*-
 
3
 
 
4
"""DocString
 
5
 
 
6
DocString Paragraph
 
7
 
 
8
"""
 
9
 
 
10
__version__ = "$Revision$"
 
11
 
 
12
import os
 
13
from core.stipple import PluginBase
 
14
 
 
15
ZSH_CONFIG = os.path.expanduser("~") + "/.zshrc"
 
16
 
 
17
class Plugin(PluginBase):
 
18
    def __init__(self):
 
19
        self.name = "Zsh"
 
20
        self.prog_name = "zsh"
 
21
        self.record_name = "zsh" 
 
22
        self.icon = None
 
23
 
 
24
    def sync(self):
 
25
            with open(ZSH_CONFIG, 'r') as zsh:
 
26
                zr = zsh.read()
 
27
            zsh.close()
 
28
            self.saveDotFile(zr)
 
29
            return True
 
30
 
 
31
    def restore(self):
 
32
        self.recoverDotFile(ZSH_CONFIG)
 
33
        return True
 
 
b'\\ No newline at end of file'