mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 07:04:29 +00:00
1e858eae35
This demonstrates that we only write control sequences when interactive.
14 lines
242 B
Bash
Executable file
14 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>"
|