Otherwise a command line like $> qlist -C -I dev-qt | sed -e 's/^/~/g' -e 's/$/-4.8.7/g' > qt-4.8.7 produces a lot of "--- Invalid atom in " in the next emerge FWIW "view <file>" often won't help - "cat <file>" however would show the mess
i think your example is incorrect. the -C flag turns off colors and should work fine. i'm pretty sure you mean the color behavior should be automatic when a pipe is detected.
(In reply to SpanKY from comment #1) > i think your example is incorrect. the -C flag turns off colors and should > work fine. i'm pretty sure you mean the color behavior should be automatic > when a pipe is detected. right - shown is the command to prevent escape sequences in the package file
hmm, this is just with pipes that we do this. the main code does look for a tty, and it does turn things off when it's not. so this works: qlist -I ... > foo we've left the pipe part enabled so you can get colors when doing: qlist -I ... | less but that does mean your case doesn't work: qlist -I ... | sed ... > foo i'd prefer to not break the pager method for now since it's easy to use the -C flag when scripting
emerge -1 $(qlist -I sec-policy/) does not work, -C is required above, any chance we can make this work too?
(In reply to Jason Zaman from comment #4) it's the same scenario -- bash creates a pipe when capturing output like that, and we currently do not turn off colors for pipes
i don't want to get into creating another common command line option or plumbing in a magic env var, so i've just deleted the fifo check for now: http://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=9a800fe6ba0176691c81f42ef50dcf37976e74ca