fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
5fe1cfb89
master
1#!/usr/bin/env python3 2from pexpect_helper import SpawnedProc ,control 3import os 4 5env = os .environ .copy () 6env ["TERM" ]= "not-dumb" 7env ["FISH_TEST_NO_RECURRENT_QUERIES" ]= "" 8 9sp = SpawnedProc (env = env ,scroll_content_up_supported = True ) 10sendline ,expect_prompt = sp .sendline ,sp .expect_prompt 11expect_prompt () 12 13sendline ("bind ctrl-g scrollback-push" ) 14sp .send_primary_device_attribute () 15expect_prompt () 16sp .send (control ("g" )) 17sp .send_cursor_position_report (y = 10 ,x = 5 ) 18sp .send_primary_device_attribute () 19sp .expect_str ("\x1b[9S\x1b[9A" ) 20 21sp .send ("\r" ) 22sp .send_cursor_position_report (y = 15 ,x = 5 ) 23sp .send_primary_device_attribute () 24sp .send (control ("l" )) 25sp .expect_str ("\x1b[14S\x1b[14A" )