Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
6d329b13
Commit
6d329b13
authored
9 years ago
by
kelianchun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove ps1 search
remove ps1 search
parent
db72048c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
connect.py
connect.py
+7
-5
No files found.
connect.py
View file @
6d329b13
...
@@ -303,6 +303,7 @@ class SshTty(Tty):
...
@@ -303,6 +303,7 @@ class SshTty(Tty):
data
=
''
data
=
''
input_str
=
''
input_str
=
''
input_mode
=
False
input_mode
=
False
vim_end_flag
=
False
try
:
try
:
tty
.
setraw
(
sys
.
stdin
.
fileno
())
tty
.
setraw
(
sys
.
stdin
.
fileno
())
tty
.
setcbreak
(
sys
.
stdin
.
fileno
())
tty
.
setcbreak
(
sys
.
stdin
.
fileno
())
...
@@ -363,12 +364,13 @@ class SshTty(Tty):
...
@@ -363,12 +364,13 @@ class SshTty(Tty):
if
input_str
!=
x
:
if
input_str
!=
x
:
data
+=
input_str
data
+=
input_str
if
self
.
vim_flag
:
if
self
.
vim_flag
:
match
=
self
.
ps1_pattern
.
search
(
self
.
vim_data
)
match
=
re
.
compile
(
r'\x1b\[\?1049'
,
re
.
X
)
.
findall
(
self
.
vim_data
)
if
match
:
if
match
:
self
.
vim_flag
=
False
if
vim_end_flag
or
len
(
match
)
==
2
:
data
=
self
.
deal_command
(
data
)[
0
:
200
]
self
.
vim_flag
=
False
if
len
(
data
)
>
0
:
vim_end_flag
=
False
TtyLog
(
log
=
log
,
datetime
=
datetime
.
datetime
.
now
(),
cmd
=
data
)
.
save
()
else
:
vim_end_flag
=
True
else
:
else
:
data
=
self
.
deal_command
(
data
)[
0
:
200
]
data
=
self
.
deal_command
(
data
)[
0
:
200
]
if
len
(
data
)
>
0
:
if
len
(
data
)
>
0
:
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment