garybernhardt/selecta

how to drop shell escape codes

Closed this issue · 2 comments

I'm not sure whether my terminal configuration is wrong or selecta's. Say there is a file called selesult. When I run ls | selecta will return �[00mselesult�[0m, thus include the shell escape codes to remove coloring. This breaks something like vim $(ls | selecta), as the file as displayed above doesn't exist.

How can I get the "porcelain" output? I would assume that it should be the default, so the error is probably on my side.

Which platform? What is the output of stty? Do you have an alias for ls? (which ls)

@rschmitt thanks, fixed. A weird ls alias was causing the problem. It was wrapped by command for some reason. I don't remember, why I set it up this way, I removed it:

$ which ls
ls='command ls --color'
        /usr/bin/command