with
with copied to clipboard
colours get lost
with with ls
i don't see the coloured folders. it'd be nice to somehow retain the colouring.
I'll look at this soon. If anyone is interested though this links seems like a first step:
http://stackoverflow.com/questions/3515208/can-colorized-output-be-captured-via-shell-redirect
I think that the problem is that aliases are not active within the script.
I tried the following command and I got coloured output:
$ with ls --color
If you check your alias for ls you'll probably see this:
$ alias ls
alias ls='ls --color=auto'
So if a support for aliases is added to the script, you should get your coloured output.
I'll take a look at this feature when I have the time.