Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
3
votes
4
answers
934
views
Emulate a number of columns for a program in the terminal
I have a program that I'd like to run, deluding it to believe that my terminal has less columns than it does, because that enables its native truncation, which I need. I tried `resize` from `xterm` as suggested [on askubuntu](https://askubuntu.com/questions/852105/is-there-a-terminal-command-that-ch...
I have a program that I'd like to run, deluding it to believe that my terminal has less columns than it does, because that enables its native truncation, which I need.
I tried
resize
from xterm
as suggested [on askubuntu](https://askubuntu.com/questions/852105/is-there-a-terminal-command-that-changes-the-terminal-window-dimensions) , however, that only works properly within xterm and can hardly be scripted.
I need something that I can use within a script to get the output of a [taskwarrior](https://taskwarrior.org/) command.
Exporting a different value for COLUMNS
doesn't seem to change anything unfortunately.
xeruf
(631 rep)
Oct 23, 2020, 11:05 AM
• Last activity: Feb 3, 2025, 10:00 PM
3
votes
1
answers
462
views
Filter tasks scheduled for the future in Taskwarrior
My custom report in Taskwarrior is set to the following: report.custom.filter=status:pending I would like to change this so that tasks scheduled for the future are hidden until their start date. For example, instead of: username@hostname:~% task custom ID PROJECT TAGS DUE DESCRIPTION 9 Reading next...
My custom report in Taskwarrior is set to the following:
report.custom.filter=status:pending
I would like to change this so that tasks scheduled for the future are hidden until their start date. For example, instead of:
username@hostname:~% task custom
ID PROJECT TAGS DUE DESCRIPTION
9 Reading next Read Gödel, Escher, Bach
10 Social waiting 4mo Wish Alice a happy birthday
in which task 10 has the property
scheduled:2018-01-01
, I would like instead to see:
username@hostname:~% task custom
ID PROJECT TAGS DUE DESCRIPTION
9 Reading next Read Gödel, Escher, Bach
And then for task 10 to appear on 2018-01-01.
gmarmstrong
(1283 rep)
Nov 30, 2017, 07:14 PM
• Last activity: Feb 3, 2025, 01:51 PM
6
votes
1
answers
2977
views
Taskwarrior: Recurring tasks that are due relative to the day of recurence
I would like to create a task in taskwarrior that repeats every day and is due every day or the day after. Is that possible? Didn't find anything on the net or the documentation.
I would like to create a task in taskwarrior that repeats every day and is due every day or the day after. Is that possible?
Didn't find anything on the net or the documentation.
lukmi
(73 rep)
Jul 5, 2017, 05:05 AM
• Last activity: Feb 3, 2025, 01:51 PM
4
votes
2
answers
4284
views
How to manage recurring tasks in taskwarrior?
I am having troubles understanding how to manage recurring tasks in [taskwarrior][1] I start with an empty database: $ task [task next] No matches. I add a recurring daily task: $ task add recur:daily due:later test It shows up in the report: $ task [task next] ID Age Recur Due Description Urg 2 - P...
I am having troubles understanding how to manage recurring tasks in taskwarrior
I start with an empty database:
$ task
[task next]
No matches.
I add a recurring daily task:
$ task add recur:daily due:later test
It shows up in the report:
$ task
[task next]
ID Age Recur Due Description Urg
2 - P1D 19.2y test 2.4
1 task
Creating recurring task instance 'test'
If I mark it done like this:
$ task 2 done
Completed task 2 'test'.
Completed 1 task.
$ task
[task next]
No matches.
it disappears from the report. I believe it makes sense, since "I completed the daily task today".
The problem is it never appears again the next day and further. What am I doing wrong?
AnonymousLurker
(383 rep)
Nov 26, 2018, 04:51 PM
• Last activity: Feb 3, 2025, 01:50 PM
7
votes
1
answers
1745
views
How to override warning in Taskwarrior?
I have the following output whenever I issue `task`: TASKRC override: /path/taskrc TASKDATA override: /path/.task It's because I put the config and data files in non-default external location specified by `$TASKRC` and `$TASKDATA` environment variables of [Taskwarrior](https://taskwarrior.org/). How...
I have the following output whenever I issue
task
:
TASKRC override: /path/taskrc
TASKDATA override: /path/.task
It's because I put the config and data files in non-default external location specified by $TASKRC
and $TASKDATA
environment variables of [Taskwarrior](https://taskwarrior.org/) .
How could I make task
to be quiete and not warn me everytime.
I'd like to find the command line switch to make it quiet for the issueing time (once) and the also config file option to make it permanent, if any.
user86041
May 25, 2017, 10:39 AM
• Last activity: Nov 10, 2024, 05:56 AM
1
votes
1
answers
532
views
How can I echo taskwarrior output to a file without truncation?
Whenever I run the following: task due.before:tom or schedule.before:tom > somefile The content of `somefile` is always truncated. But running this without the redirect, it works fine. How can I fix this?
Whenever I run the following:
task due.before:tom or schedule.before:tom > somefile
The content of
somefile
is always truncated. But running this without the redirect, it works fine.
How can I fix this?
Korgan Rivera
(2563 rep)
Oct 16, 2021, 07:03 PM
• Last activity: Jan 30, 2022, 01:40 PM
6
votes
1
answers
2110
views
Taskwarrior Question : Howto show completed projects?
to show all completed tasks the command is in Taskwarrior : task status:completed all but what is the command for showing only the completed projects (not including the completed tasks !)
to show all completed tasks the command is in Taskwarrior :
task status:completed all
but what is the command for showing only the completed projects
(not including the completed tasks !)
Theo
(61 rep)
Mar 21, 2021, 12:29 PM
• Last activity: Nov 10, 2021, 04:06 PM
5
votes
4
answers
2443
views
How to add multiple tasks in one command on Taskwarrior?
How can I add multiple tasks in one command line on [Taskwarrior](https://taskwarrior.org/)? I'd like to achieve something like: task add task1 tag:tag1, task2 tag:tag2 I think there should be a delimiter to separate tasks.
How can I add multiple tasks in one command line on [Taskwarrior](https://taskwarrior.org/) ?
I'd like to achieve something like:
task add task1 tag:tag1, task2 tag:tag2
I think there should be a delimiter to separate tasks.
user86041
May 25, 2017, 09:59 AM
• Last activity: Sep 12, 2021, 07:18 PM
0
votes
1
answers
145
views
How to adjust taskwarrior report height?
With the command `task next`, taskwarrior produces a report of urgent next tasks. The report is apparently scaled to the terminal height. I use zshell with a special prompt which is 2-lines high. Because of this, taskwarrior appears to be miscalculating the max height, and I end up with the next tas...
With the command
task next
, taskwarrior produces a report of urgent next tasks. The report is apparently scaled to the terminal height.
I use zshell with a special prompt which is 2-lines high. Because of this, taskwarrior appears to be miscalculating the max height, and I end up with the next tasks table header hidden from view.
Is there a way to adjust how the next tasks report calculates terminal height?
Bagalaw
(1085 rep)
Nov 19, 2019, 10:33 PM
• Last activity: Apr 15, 2020, 03:24 PM
2
votes
1
answers
19345
views
Why is command line program killed by SIGABRT?
I've been using a command line program (installed via package manager) that was working fine until I used vim to inadvertently insert a null byte (^@) in one of the program's data files when doing search and replace using the vim `:s`(substitute) command. Since then the program won't run instead I g...
I've been using a command line program (installed via package manager) that was working fine until I used vim to inadvertently insert a null byte (^@) in one of the program's data files when doing search and replace using the vim
:s
(substitute) command. Since then the program won't run instead I get this error:
/usr/include/c++/9/bits/basic_string.h:1048: std::__cxx11::basic_string::const_reference std::__cxx11::basic_string::operator[](std::__cxx11::basic_string::size_type) const [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator; std::__cxx11::basic_string::const_reference = const char&; std::__cxx11::basic_string::size_type = long unsigned int]: Assertion '__pos <= size()' failed.
Aborted (core dumped)
gnome-abrt shows that the reason for the error is:
task killed by SIGABRT
Specifically SIGABRT 6
- In Linux, what does inserting a null byte in a text file that is read by an executable do? The way the null byte was inserted into the program's data file is analogous to if I insert a null byte in a git commit message and that somehow breaks git.
- Could the null byte be causing the program to crash when it reads that text file or is there a different reason?
bit
(1176 rep)
Jul 9, 2019, 05:55 PM
• Last activity: Dec 6, 2019, 02:02 PM
2
votes
0
answers
229
views
taskwarrior - limit calendar month output
I am working on writing a tmux script to create a fun tmux environment in cygwin. When I type 'task calendar' the output appears to look fine, but when I run the same command through my tmux script, the word wrapping creates a poorly formatted output. This is my super basic tmux script. #!/bin/bash...
I am working on writing a tmux script to create a fun tmux environment in cygwin.
When I type 'task calendar' the output appears to look fine, but when I run the same command through my tmux script, the word wrapping creates a poorly formatted output.
This is my super basic tmux script.
#!/bin/bash -x
tmux split-window -v ;
tmux split-window -h top ;
tmux select-pane -t 0;
tmux split-window -h mc;
tmux select-pane -t 0;
tmux split-window -h "view -p ~/Documents/*";
tmux select-pane -t 0;
tmux select-pane -t 3
tmux send-keys 'task calendar' Enter
I can't make sense of how-to control the output so the calendar doesn't look like this:
You will see

$task
calendar, but this was due to the tmux send-keys 'task calendar' Enter command above.
If I run 'task calendar by itself, the output appears properly, and the lines are lined up as I would expect.
Apologies, as this is my first post, and I'm not super familiar with all of the programming terminology. (mostly self-taught)
I think an easy solution would be to limit the calendar month to a single month output, but I can't find this in the man pages. If you have the solution, can you also explain where I'm going wrong so I can learn from this? :) My brain is toast right now...
Mr. B
(21 rep)
Sep 9, 2019, 10:44 PM
• Last activity: Sep 10, 2019, 01:33 AM
0
votes
0
answers
139
views
Raising permissions of account "dummy" when executing command from "root" as "dummy"?
**Context:** While trying to execute command `su a -c task` as user `dummy` when being logged (with `sudo su` in as `root` on Ubuntu 16.04, I receive the following error message: > `root@DESKTOP-344ab:/home/dummy# su dummy -c task` >`[task next] Taskwarrior does not have the correct permissions for...
**Context:**
While trying to execute command
su a -c task
as user dummy
when being logged (with sudo su
in as root
on Ubuntu 16.04, I receive the following error message:
> root@DESKTOP-344ab:/home/dummy# su dummy -c task
>`[task next] Taskwarrior does not have the correct permissions for
> '/home/dummy/.task/pending.data'. root@DESKTOP-344ab:/home/dummy#`
Whereas when I first switch from root
back to user with su dummy
* and then execute task
it runs fine. *When the dummy
account is logged in, the following .bashrc
file from /home/dummy/.bashrc
is executed automatically before the user can do anything:
sudo -i service cron start
#get root
if [ ! -f /home/a/maintenance/getRootBool ]; then
echo "Getting sudo rights now."
touch /home/a/maintenance/getRootBool
sudo -s
fi
# remove got root boolean for next time you boot up Unix
sudo rm /home/a/maintenance/getRootBool
#Start cron service
#sudo -i service cron start
#Startup taskwarrior
export TASKDDATA=/var/taskd
cd $TASKDDATA
sudo taskd config --data $TASKDDATA
taskdctl start
task sync
Which leads to the following "user description" in the bottom left of terminal: root@DESKTOP-344ab:~#
. That slightly confuses me because it still says root
even though when I cd ~
it goes to /home/dummy
, which seems like it has root
permission but is still in the dummy account
.
So I think the sudo -s
from the .bashrc
script raises the permissions of user dummy
to root.
**Question:** How do I raise the permissions of the dummy
account when executing a command as: su dummy -c task
as user dummy
from root
?
**Attempts:**
1. su dummy -c sudo task
, that indicates the usage of sudo
is not correct, meaning I did not use valid syntax.
2. info sudo
To inspect what the sudo -s
exactly does in the .bashrc
script as that appears to be the permission raising command whilst still staying within the dummy
user. That says:
> -s, --shell
> Run the shell specified by the SHELL environment variable if it is set or the shell specified by the invoking user's
> password database entry. If a command is specified, it
> is passed to the shell for execution via the shell's -c option. If no command is specified, an interactive shell is executed.
It mainly appears to affect shell commands, currently I am unsure whether task
is a shell command, and if yes, how the sudo -s
raises permission. It makes me doubt my assumption that it probably is the sudo -s
indeed the permission raising command. I am looking further into that.
**Additionally:**
As a response to the comments below, the output of the .bashrc
file is:
* Starting periodic command scheduler cron [ OK ]
Getting sudo rights now.
touch: cannot touch '/home/dummy/maintenance/getRootBool': Permission denied
* Starting periodic command scheduler cron [ OK ]
Getting sudo rights now.
* Starting periodic command scheduler cron [ OK ]
Configuration read from /var/taskd/config
Variable Value
------------- --------------------------
ca.cert /var/taskd/ca.cert.pem
client.cert /var/taskd/client.cert.pem
client.key /var/taskd/client.key.pem
confirmation 1
debug.tls 3
extensions /usr/libexec/taskd
ip.log on
log /var/taskd/taskd.log
pid.file /var/taskd/taskd.pid
queue.size 10
request.limit 1048576
root /var/taskd
server 0.0.0.0:53583
server.cert /var/taskd/server.cert.pem
server.crl /var/taskd/server.crl.pem
server.key /var/taskd/server.key.pem
trust strict
verbose 1
/usr/bin/taskdctl start: daemon started
Syncing with myserver.com:53583
Sync successful. No changes.
root@DESKTOP-344ab:/var/taskd# test
a.t.
(103 rep)
Jan 13, 2019, 04:14 PM
• Last activity: Jan 13, 2019, 05:07 PM
5
votes
1
answers
3206
views
Is it possible in taskwarrior for reminders about recurring tasks to expire automatically?
I'm using taskwarrior. I want to be reminded of something every week, but have that reminder go away automatically if I haven't completed it by the time the next week comes up. (Or, actually, I want the task to be due on Tuesday, and vanish if I don't get it done by Friday afternoon, because I'm not...
I'm using taskwarrior. I want to be reminded of something every week, but have that reminder go away automatically if I haven't completed it by the time the next week comes up. (Or, actually, I want the task to be due on Tuesday, and vanish if I don't get it done by Friday afternoon, because I'm not going to bother on the weekends and at that point it's just gonna wait for the next one.)
I know how to [set up recurring tasks](https://bugzilla.redhat.com/show_bug.cgi?id=1153638) , but there, the
until
applies to how long the weekly reminders will be generated. I want the generated weekly reminders _themselves_ to expire. Is this possible?
mattdm
(41207 rep)
Oct 21, 2014, 03:11 PM
• Last activity: Jun 10, 2018, 06:31 AM
Showing page 1 of 13 total questions