[darcs-users] proposal for whitespace annotation in darcs what

Stefan Rank e9725431 at student.tuwien.ac.at
Tue Mar 29 17:47:03 UTC 2005


hi

this is a wishlist thing, but i wanted to ask the list first, maybe 
there is an easier way which i do not see:

i'd like to have two options for `darcs whatsnew`:

- `--shownewlines`: outputs the type of line ending after each hunk line
- `--showtabsas=<string>`: replaces tabs in the output with <string>

this would change the following::

   $ darcs what whitespacechangefile.txt
   What's new in "whitespacechangefile.txt":

   {
   hunk ./whitespacechangefile.txt 1
   -        this line has changed
   +        this line has changed
   }

to the more informative::

   {
   hunk ./whitespacechangefile.txt 1
   -        this line has changed<LF>
   +<tb><tb>this line has changed      <CRLF>
   }

the first option takes care of showing lineendings changes and trailing 
whitespace,
the second handles the display of tabs vs. spaces/soft tabs.

Is there an easy way of making the shell itself do that outside of darcs?

The tabs option can possibly be worked around using unix pipes, I do not 
think thats doable for changed line endings.
However, the tabs option might also be extended to allow arbitrary 
replacement of (non-printable) characters... ?

best,
stefan




More information about the darcs-users mailing list