mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-23 09:24:03 +08:00
1e858eae35
This demonstrates that we only write control sequences when interactive.
15 lines
242 B
Bash
Executable File
15 lines
242 B
Bash
Executable File
#!/bin/sh
|
|
|
|
escape=$(printf '\033')
|
|
|
|
"$1" -c 'cat | string replace -ra $argv[1] ""' -- "\
|
|
""$escape\[\?2004h""\
|
|
""$escape\[>4;1m""\
|
|
""$escape\[>5u""\
|
|
""$escape=""\
|
|
""|""\
|
|
""$escape\[\?2004l""\
|
|
""$escape\[>4;0m""\
|
|
""$escape\[<1u""\
|
|
""$escape>"
|