question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Escape tabs in west list -f

See original GitHub issue

It would be nice if west list -f could escape tabs: e.g. west list -f "{revision} \t {name}"

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lemreycommented, Jun 5, 2019

Thank you Marti, truncation is what I needed and it works as expected! 🙇

0reactions
mbolivarcommented, Jun 4, 2019

Padding does not seem to work:

$ west list -f '{revision:50} {name}'
(not set)                                          nrf
0023611bbfabd0698a38a12e6f30d7a2a9108702           fw-nrfconnect-zephyr
447495faa326082198c8e12493a2097f2ae20a99           fw-nrfconnect-mcuboot
ef1f9c3d87474ec3570b1f46e91fd4b54a4fb421           fw-nrfconnect-tinycbor
v0.4.0                                             nrfxlib
c243b9a7a7b3c471023193992b46cf1bd1910450           cmock
031f3bbe45f8adf504ca3d13e6f093869920b091           unity
mbedtls-2.13.1                                     mbedtls
$ west list -f '{revision:>50}'
                                         (not set)
          0023611bbfabd0698a38a12e6f30d7a2a9108702
          447495faa326082198c8e12493a2097f2ae20a99
          ef1f9c3d87474ec3570b1f46e91fd4b54a4fb421
                                            v0.4.0
          c243b9a7a7b3c471023193992b46cf1bd1910450
          031f3bbe45f8adf504ca3d13e6f093869920b091
                                    mbedtls-2.13.1

Working fine for me with west v0.5.8, and your example does what I would expect it to do. If you want truncation, use a period:

$ west list -f '{revision:.4}'
(not
0023
4474
ef1f
v0.4
c243
031f
mbed
Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot Get Python to Recognize Escape Tab Character
I've tried several methods for splitting a string by a tab character to no avail. testStr = 'word1 word2' values = testStr.split("\t") print( ......
Read more >
HTML Escape Characters: Complete List of HTML Entities
Number Symbol Entity Name Code Description 9 Tab &Tab &#9 Tab 10 New Line &NewLine &#10 New Line 32 Space &nbsp &#32 Space
Read more >
ANSI Escape Codes - gists · GitHub
Standard escape codes are prefixed with Escape : ... \t, ^I, Horizontal TAB ... Refer to the XTerm Control Sequences for a more...
Read more >
Escape sequences - cppreference.com
Escape sequences are used to represent certain special characters within string literals and character literals. ↑ Conditional escape sequences are ...
Read more >
Escape sequences in C - Wikipedia
In C, all escape sequences consist of two or more characters, the first of which is the backslash, \ (called the "Escape character");...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found