Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect output for script command's log #4

Open
KSR-Yasuda opened this issue Mar 23, 2023 · 0 comments
Open

Incorrect output for script command's log #4

KSR-Yasuda opened this issue Mar 23, 2023 · 0 comments

Comments

@KSR-Yasuda
Copy link

script command outputs log like below:

Script started on 2023-03-23 10:36:59+0900
�]0;user@machine_name: ~/dir_path��[01;32muser@machine_name�[00m:�[01;34m~/dir_path�[00m$ exit

Script done on 2023-03-23 10:37:00+0900
hex
00000000: 5363 7269 7074 2073 7461 7274 6564 206f  Script started o
00000010: 6e20 3230 3233 2d30 332d 3233 2031 303a  n 2023-03-23 10:
00000020: 3336 3a35 392b 3039 3030 0a1b 5d30 3b75  36:59+0900..]0;u
00000030: 7365 7240 6d61 6368 696e 655f 6e61 6d65  ser@machine_name
00000040: 3a20 7e2f 6469 725f 7061 7468 071b 5b30  : ~/dir_path..[0
00000050: 313b 3332 6d75 7365 7240 6d61 6368 696e  1;32muser@machin
00000060: 655f 6e61 6d65 1b5b 3030 6d3a 1b5b 3031  e_name.[00m:.[01
00000070: 3b33 346d 7e2f 6469 725f 7061 7468 1b5b  ;34m~/dir_path.[
00000080: 3030 6d24 2065 7869 740a 0a53 6372 6970  00m$ exit..Scrip
00000090: 7420 646f 6e65 206f 6e20 3230 3233 2d30  t done on 2023-0
000000a0: 332d 3233 2031 303a 3337 3a30 302b 3039  3-23 10:37:00+09
000000b0: 3030 0a                                  00.

In stripping this, the head of prompt �]0;user@machine_name: is not correctly stripped.

Script started on 2023-03-23 10:36:59+0900
;user@machine_name: ~/dir_path�user@machine_name:~/dir_path$ exit

Script done on 2023-03-23 10:37:00+0900

Could you fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant