mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
2d07aa2686
This was an sh-script that just invoked fish again. I can see how we could implement it in another language to avoid the fish under test corrupting the results, but it literally invoked the fish under test anyway.
17 lines
291 B
Fish
Executable file
17 lines
291 B
Fish
Executable file
#!/usr/bin/fish
|
|
# Remove the sorts of escape sequences interactive fish prints.
|
|
|
|
# First the enable sequences
|
|
set -l escapes "\e\[\?2004h"\
|
|
"\e\[>4;1m"\
|
|
"\e\[>5u"\
|
|
"\e="\
|
|
# or
|
|
"|"\
|
|
# the disable sequences
|
|
"\e\[\?2004l"\
|
|
"\e\[>4;0m"\
|
|
"\e\[<1u"\
|
|
"\e>"
|
|
|
|
cat | string replace -ra -- $escapes ''
|