This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

d --tree problem with "line draw" characters


d -t in bash in a command shell gives string like "0xB", "0mqB", "0tqB",
etc, instead of line draw characters or ASCII characters that can substitute
for line draw characters (e.g., "|-\+").

for example
/c/dw2> d -t -c- | head
/c/DW2/:
  0tqBNIAID/:
  0xB   0mqBNIAID.batch
  0tqBout/:
  0xB   0tqBCC/:
  0xB   0tqBCDC/:
  0xB   0tqBCIT/:
  0xB   0tqBFDA/:
  0xB   0tqBFIC/:
  0xB   0tqBIHS/:
/c/dw2> d -t -c- | head | od -c
0000000   /   c   /   D   W   2   /   :  \n         033   (   0   t   q
0000020 033   (   B   N   I   A   I   D   /   :  \n         033   (   0
0000040   x 033   (   B             033   (   0   m   q 033   (   B   N
0000060   I   A   I   D   .   b   a   t   c   h  \n         033   (   0
0000100   t   q 033   (   B   o   u   t   /   :  \n         033   (   0
0000120   x 033   (   B             033   (   0   t   q 033   (   B   C
0000140   C   /   :  \n         033   (   0   x 033   (   B
0000160 033   (   0   t   q 033   (   B   C   D   C   /   :  \n
0000200 033   (   0   x 033   (   B             033   (   0   t   q 033
0000220   (   B   C   I   T   /   :  \n         033   (   0   x 033   (
0000240   B             033   (   0   t   q 033   (   B   F   D   A   /
0000260   :  \n         033   (   0   x 033   (   B             033   (
0000300   0   t   q 033   (   B   F   I   C   /   :  \n         033   (
0000320   0   x 033   (   B             033   (   0   t   q 033   (   B
0000340   I   H   S   /   :  \n
0000346

What environmental variable need to be set to get to get this to work?

Might the maintainer patch d so that it detects the state and automatically
puts out the characters that work?  (I know, PTC, but I'm not a programmer.)

For the record, one can do the following (note the reintroduction of
colorization), but it is a severely inconvenient:
/c/dw2> d -t | head | sed -e 's/^[(B//g' -e 's/^[(0x/|/g' -e 's/^[(0tq/+/g'
-e 's/^[(0mq/\\/g'
/c/DW2/:
  +NIAID/:
  |   \NIAID.batch
  +out/:
  |   +CC/:
  |   +CDC/:
  |   +CIT/:
  |   +FDA/:
  |   +FIC/:
  |   +IHS/:

- Barry Buchbinder

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]