GothenburgBitFactory / GothenburgBitFactory/taskwarrior

[TW-956] Tweak default column width when output is not to terminal.

Open
#991 18 comments 0 reactions 0 assignees View on GitHub
type:enhancement
Dominant language
C++
Stars
6.1k
Forks
423
Avg merge
1d 19h
Merged PRs (30d)
11

Description

_Eric Fluger on 2011-03-29T16:49:52Z says:_

consider changing default behavior when output is not to terminal to either:
* - include defaultwidth=0, or
* - set defaautwidth to current screen width.

defaultwidth=0 would assure output with one record per line for convenient use of utities like awk or sed that expect same.

using current screen width would tend to output same as on screen which might be better for printing and could still be helpful for scripting, but probably more work to implement.
* ---

from earlier, erroneous bug report:

...yes defaultwidth=0 is just what i need. dunno how i missed it. i've been using a wide terminal and landscape printing so i don't usually need wrapping at all and setting this in taskrc seems to be working out OK so far, though i haven't really given it a workout yet. this may not be true for others.

while this seems to solve my immediate problem i think a small change in default behavior may be worth consideration.

random musings: task changes behavior when output is not to a terminal, so the test for that condition is already in place. along with suppressing color, it might be good to also either suppress line wrapping altogether, or use the current line length of the terminal, though i don't know how the latter would work out in scripts. suppressing it altogher strikes me as more straight forward. perhaps setting defaultwidth to zero and adding a forcewidth variable to taskrc along with forcecolor?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.