open,shut
This commit is contained in:
parent
c1eaf978d7
commit
27a9b419d9
2 changed files with 23 additions and 21 deletions
24
cd.sh
24
cd.sh
|
@ -575,23 +575,15 @@ cd_write_python_module () {
|
|||
cd_write "${CD_PYTHON_PACKAGES}/env.py" "\
|
||||
STEP = ${CD_STEP}
|
||||
|
||||
|
||||
$(cd_echo CD_DOWN CD_VERTICAL CD_UP)
|
||||
|
||||
$(cd_echo CD_OPEN CD_SHUT)
|
||||
|
||||
$(cd_echo CD_SPLIT)
|
||||
|
||||
|
||||
$(cd_echo CD_OS_ID CD_OS_VERSION)
|
||||
|
||||
DOWN = \"${CD_DOWN}\"
|
||||
VERTICAL = \"${CD_VERTICAL}\"
|
||||
UP = \"${CD_UP}\"
|
||||
|
||||
SPLIT = \"${CD_SPLIT}\"
|
||||
|
||||
|
||||
def open(*arguments):
|
||||
print('${CD_OPEN}', end=str())
|
||||
print(*arguments, flush=True)
|
||||
|
||||
|
||||
def shut(*arguments):
|
||||
print('${CD_SHUT}', end=str())
|
||||
print(*arguments, flush=True)
|
||||
"
|
||||
}
|
||||
|
||||
|
|
|
@ -110,12 +110,22 @@ def set_ssh(*arguments):
|
|||
os.chmod(known, 0o400)
|
||||
|
||||
|
||||
def open(*arguments):
|
||||
print(env.CD_OPEN, end=str())
|
||||
print(*arguments, flush=True)
|
||||
|
||||
|
||||
def shut(*arguments):
|
||||
print(env.CD_SHUT, end=str())
|
||||
print(*arguments, flush=True)
|
||||
|
||||
|
||||
def split():
|
||||
print(env.SPLIT, flush=True)
|
||||
print(env.CD_SPLIT, flush=True)
|
||||
|
||||
|
||||
def step(*arguments):
|
||||
env.STEP += 1
|
||||
print(env.DOWN)
|
||||
print(env.VERTICAL, env.STEP, *arguments)
|
||||
print(env.UP, flush=True)
|
||||
env.CD_STEP += 1
|
||||
print(env.CD_DOWN)
|
||||
print(env.CD_VERTICAL, env.CD_STEP, *arguments)
|
||||
print(env.CD_UP, flush=True)
|
||||
|
|
Loading…
Reference in a new issue