Package Details: todotxt 2.12.0.post2-2

Git Clone URL: https://aur.archlinux.org/todotxt.git (read-only, click to copy)
Package Base: todotxt
Description: Simple and extensible shell script for managing your todo.txt file
Upstream URL: https://github.com/todotxt/todo.txt-cli
Keywords: todo
Licenses: GPL3
Submitter: darose
Maintainer: willemw
Last Packager: willemw
Votes: 137
Popularity: 0.32
First Submitted: 2006-11-28 22:41 (UTC)
Last Updated: 2022-05-07 11:34 (UTC)

Dependencies (2)

Required by (1)

Sources (1)

Latest Comments

lbortoli commented on 2022-04-25 19:53 (UTC)

I tried with the latest version and removing the sourcing from my .bashrc file and it's working fine, thanks!

willemw commented on 2022-04-25 19:34 (UTC)

Sourcing the completion file is not necessary with the latest update.

@lbortoli: Thanks for reporting the issue.

lbortoli commented on 2022-04-25 13:10 (UTC)

Thank you guys, I already solved it by sourcing the completion in my .bashrc file.

willemw commented on 2022-04-24 19:28 (UTC)

@lborti: make sure 'bash-completion' is installed. Try this as a test (run as root):

mv /usr/share/bash-completion/completions/todo /usr/share/bash-completion/completions/todo.sh

Then start bash again and test todotxt's tab completion.

leonardof commented on 2022-04-24 18:19 (UTC)

@lborti, this helped me with bash tab completion complaining about "function _todo not found"

# Somehow this is not loading by itself...
source /usr/share/bash-completion/completions/todo

willemw commented on 2022-04-12 19:28 (UTC)

@lbortoli: assuming that you have version 2.12.0.post1-3 installed and file /usr/share/bash-completion/completions/todo exists, then something on your system is interfering with tab-completion, I think.

lbortoli commented on 2022-04-12 17:45 (UTC)

@willemw: when I do that, I get a list of files and folders, and I'm assuming I'll get the list of commands instead. Also if I do the following: todo.sh a<TAB><TAB> nothing happens, where I'd expect the add command to appear.

willemw commented on 2022-04-12 17:27 (UTC)

@lbortoli: make sure you are running bash. Then the following should display a list: todo<TAB><TAB><TAB> or todo.sh<SPACE><TAB><TAB>

lbortoli commented on 2022-04-12 13:12 (UTC)

Hello! I just installed this package and it seems that bash completion is not working.

willemw commented on 2021-08-08 11:41 (UTC)

@billypilgrim: bash completion now works out-of-the-box again.

willemw commented on 2021-07-29 21:06 (UTC) (edited on 2021-10-04 18:23 (UTC) by willemw)

@dreieck: Thanks. Should be fixed in the next release/update. If you want, you can follow the progress of the github issue (see URL below) and maybe test the fix before the next release, for example, by copying the check() function from todotxt-git's PKGBUILD and run the tests.

dreieck commented on 2021-07-29 15:43 (UTC)

I have added unser XDG_CONFIG_HOME in the PKGBUILD in build(), check() and package() and I get a failing check() with
* FAIL 1: no config file
* FAIL 2: custom action (default location 2)
* FAIL 5: config file (global config file)

It had to do that I have $TODO*-variables set.

I had to also unset those variables in addition to $XDG_CONFIG_HOME in check().

check() succeeds for me if I add to it:

  unset XDG_CONFIG_HOME
  unset TODO_DIR
  unset TODOTXT_FINAL_FILTER
  unset TODO_ACTIONS_DIR
  unset TODO_NOTES_DIR
  unset TODO_NOTE_TAG
  unset TODOTXT_SORT_COMMAND
  unset TODO_CONF_DIR
  unset TODO_FILE
  unset TODO_NOTE_EXT

Here, for completeness, the error I get in check() with only unset XDG_CONFIG_HOME:

==> Starting check()...
rm -rf tests/test-results "tests/trash directory"*
cd tests && ./t0000-config.sh 
cd tests && ./t0001-null.sh 
cd tests && ./t0002-actions.sh 
cd tests && ./t0100-code-nobacktick.sh 
*   ok 1: no old-style backtick command substitution 1
* FAIL 1: no config file

    todo.sh > output 2>&1 || test_cmp expect output

*   ok 2: no old-style backtick command substitution 2
* FAIL 1: custom action (default location 1)

    mkdir .todo.actions.d
    cp foo .todo.actions.d/
    todo.sh foo > output;
    test_cmp expect output && rm -rf .todo.actions.d

* passed all 2 test(s)*   ok 1: null ls

*   ok 2: config file (default location 1)
cd tests && ./t1000-addlist.sh 
* FAIL 2: custom action (default location 2)

    mkdir -p .todo/actions
    cp foo .todo/actions/
    todo.sh foo > output;
    test_cmp expect output && rm -rf .todo/actions

*   ok 3: config file (default location 2)*   ok 2: null list

*   ok 3: custom action (env variable)
*   ok 4: config file (default location 3)* failed 2 among 3 test(s)

make: *** [Makefile:96: tests/t0002-actions.sh] Error 1
make: *** Waiting for unfinished jobs....
*   ok 1: basic add/list 1
* FAIL 5: config file (global config file)

    cp test.cfg "$TODOTXT_GLOBAL_CFG_FILE"
    todo.sh > output;
    test_cmp expect output && test -f used_config &&
        rm -f "$TODOTXT_GLOBAL_CFG_FILE"

*   ok 3: null list filter
*   ok 6: config file (command line)
*   ok 7: config file (env variable)
*   ok 2: basic add/list 2
*   ok 8: config file (minimal)
* failed 2 among 8 test(s)*   ok 4: null lsp

make: *** [Makefile:96: tests/t0000-config.sh] Error 1
*   ok 3: basic add/list 3
*   ok 5: null listpri*   ok 4: basic add/list 4

*   ok 5: basic list filtering 1
*   ok 6: null listpri a
*   ok 6: basic list filtering 2
*   ok 7: case-insensitive filtering 1
*   ok 7: null lsa
*   ok 8: case-insensitive filtering 2
*   ok 9: add with symbols 1
*   ok 8: null list
*   ok 10: add with symbols 2
*   ok 11: add with symbols 3
*   ok 9: null list filter
*   ok 12: add with spaces 1
*   ok 10: null lsc
*   ok 13: add with spaces 2
*   ok 11: null listcon
*   ok 12: null lsprj
*   ok 14: add with spaces 3
*   ok 13: null listproj
*   ok 14: null lf
*   ok 15: add with CR 1
*   ok 15: null listfile
*   ok 16: null listfile foo.txt
* passed all 16 test(s)*   ok 16: add with CR 2

*   ok 17: add to file without EOL 1
*   ok 18: add to file without EOL 2
* passed all 18 test(s)
==> ERROR: A failure occurred in check().

billypilgrim commented on 2021-07-28 05:27 (UTC)

That seemed to do the trick. Thanks!

willemw commented on 2021-07-27 16:15 (UTC)

Maybe that has changed. According to the current instructions: https://github.com/todotxt/todo.txt-cli/wiki/Quick-Start-Guide#optional

. /usr/share/bash-completion/completions/todo

billypilgrim commented on 2021-07-27 16:09 (UTC)

Nope. Is that necessary? I didn't have to do that before...

willemw commented on 2021-07-27 14:06 (UTC) (edited on 2021-07-27 14:12 (UTC) by willemw)

@billypilgrim: it is working for me. Do you "source" the completion file in Bash?

billypilgrim commented on 2021-07-27 08:37 (UTC)

Is bash completion broken for other peeps? I'm not sure which update broke things, but it definitely used to work for me :-(

willemw commented on 2021-07-20 20:04 (UTC)

I did think it had something to do with some environment setting (XDG, for example). Yesterday I made a similar fix for testing the backintime-git package.

serxxx commented on 2021-07-20 19:57 (UTC)

This is being addressed upstream.

serxxx commented on 2021-07-20 09:03 (UTC) (edited on 2021-07-20 09:05 (UTC) by serxxx)

According to https://github.com/todotxt/todo.txt-cli/issues/347#issuecomment-882713620, the failures are caused by:

1, Users having XDG_CONFIG_HOME set, and
2, having a $XDG_CONFIG_HOME/todo/config file

Unsetting $XDG_CONFIG_HOME causes the tests to pass. While I don't yet know whether this will be changed upstream, AFAIK that's not an invalid user set-up and seems to cause false failures -- it might be good to have the PKGBUILD unset the variable before running the tests.

willemw commented on 2021-07-19 10:17 (UTC)

Tried the same yay command: all tests pass. Is it downloading the correct version?

==> Retrieving sources...
  -> Cloning todotxt-2.12.0.post1 git repo...

Do you get the same result building with makepkg (after git clone) or in a clean chroot environment?

The first test already fails: "FAIL 1: no config file". You can run tests in verbose or debug mode: TEST_OPTIONS=--verbose makepkg

I get this with the first test in verbose mode:

==> Starting check()...               
* expecting success:                           
    todo.sh > output 2>&1 || test_cmp expect output

Fatal Error: Cannot read configuration file /home/willem/todotxt/src/todotxt-2.12.0.post1/tests/trash directory.t0000-config/.todo/config
*   ok 1: no config file

serxxx commented on 2021-07-19 09:29 (UTC) (edited on 2021-07-19 10:05 (UTC) by serxxx)

@willemw, I see the same problem as @dreieck. FWIW, I cloned the upstream repository and get the same test failures with make test.

10018» yay -Sy --noconfirm --answerclean All todotxt                                                  ~
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community                           5.6 MiB  5.27 MiB/s 00:01 [----------------------------------] 100%
 multilib is up to date
...
  1 todotxt                          (Installed) (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> All
...
==> Starting check()...
rm -rf tests/test-results "tests/trash directory"*
cd tests && ./t0000-config.sh
* FAIL 1: no config file

    todo.sh > output 2>&1 || test_cmp expect output

*   ok 2: config file (default location 1)
*   ok 3: config file (default location 2)
*   ok 4: config file (default location 3)
* FAIL 5: config file (global config file)

    cp test.cfg "$TODOTXT_GLOBAL_CFG_FILE"
    todo.sh > output;
    test_cmp expect output && test -f used_config &&
        rm -f "$TODOTXT_GLOBAL_CFG_FILE"

*   ok 6: config file (command line)
*   ok 7: config file (env variable)
*   ok 8: config file (minimal)
* failed 2 among 8 test(s)
make: *** [Makefile:96: tests/t0000-config.sh] Error 1
==> ERROR: A failure occurred in check().
    Aborting...
error making: todotxt

Edit: Issue filed upstream: https://github.com/todotxt/todo.txt-cli/issues/347

willemw commented on 2021-07-06 17:24 (UTC)

@dreieck: Cannot reproduce that error. All tests pass. Tried it in a clean chroot, with makepkg and paru.

Try again after removing this package's build cache or try to build with "makepkg -si" and see if that works.

dreieck commented on 2021-07-06 13:36 (UTC) (edited on 2021-07-06 13:38 (UTC) by dreieck)

I get an error in check():

==> Starting check()...
rm -rf tests/test-results "tests/trash directory"*
cd tests && ./t0000-config.sh 
cd tests && ./t0001-null.sh 
cd tests && ./t0002-actions.sh 
cd tests && ./t0100-code-nobacktick.sh 
*   ok 1: no old-style backtick command substitution 1
* FAIL 1: no config file

    todo.sh > output 2>&1 || test_cmp expect output

*   ok 2: no old-style backtick command substitution 2
* passed all 2 test(s)
cd tests && ./t1000-addlist.sh 
* FAIL 1: custom action (default location 1)

    mkdir .todo.actions.d
    cp foo .todo.actions.d/
    todo.sh foo > output;
    test_cmp expect output && rm -rf .todo.actions.d

*   ok 1: null ls*   ok 2: config file (default location 1)

* FAIL 2: custom action (default location 2)*   ok 3: config file (default location 2)

    mkdir -p .todo/actions
    cp foo .todo/actions/
    todo.sh foo > output;
    test_cmp expect output && rm -rf .todo/actions


*   ok 4: config file (default location 3)
*   ok 3: custom action (env variable)*   ok 2: null list

* failed 2 among 3 test(s)
make: *** [Makefile:96: tests/t0002-actions.sh] Error 1
make: *** Waiting for unfinished jobs....
*   ok 1: basic add/list 1
* FAIL 5: config file (global config file)

    cp test.cfg "$TODOTXT_GLOBAL_CFG_FILE"
    todo.sh > output;
    test_cmp expect output && test -f used_config &&
        rm -f "$TODOTXT_GLOBAL_CFG_FILE"

*   ok 6: config file (command line)
*   ok 3: null list filter
*   ok 7: config file (env variable)*   ok 2: basic add/list 2

*   ok 8: config file (minimal)
* failed 2 among 8 test(s)*   ok 4: null lsp
*   ok 3: basic add/list 3make: *** [Makefile:96: tests/t0000-config.sh] Error 1


*   ok 4: basic add/list 4
*   ok 5: null listpri
*   ok 5: basic list filtering 1
*   ok 6: null listpri a
*   ok 6: basic list filtering 2
*   ok 7: case-insensitive filtering 1
*   ok 7: null lsa
*   ok 8: case-insensitive filtering 2
*   ok 9: add with symbols 1
*   ok 10: add with symbols 2
*   ok 8: null list
*   ok 11: add with symbols 3
*   ok 12: add with spaces 1
*   ok 9: null list filter
*   ok 10: null lsc
*   ok 13: add with spaces 2
*   ok 11: null listcon
*   ok 12: null lsprj*   ok 14: add with spaces 3

*   ok 13: null listproj
*   ok 15: add with CR 1
*   ok 14: null lf
*   ok 15: null listfile
*   ok 16: add with CR 2
*   ok 16: null listfile foo.txt
* passed all 16 test(s)
*   ok 17: add to file without EOL 1
*   ok 18: add to file without EOL 2
* passed all 18 test(s)
==> ERROR: A failure occurred in check().
    Aborting...

Does the test need to be run on a custom provided config file (FAIL 1: no config file)?

willemw commented on 2021-06-18 18:15 (UTC) (edited on 2021-06-18 18:15 (UTC) by willemw)

@dkaparis: When the next release comes out, this package will follow the releases as normal.

Version 2.12.0.post1 is a one-time in-between release version, at my discretion, that allows me to use the new "make; make install" build procedure. BTW, all the "make test" tests are passing. But if there are objections to this version, then I could change it back to 2.12.0.

dkaparis commented on 2021-06-18 17:56 (UTC)

What is the "2.12.0.post1" version?

I don't see such release at https://github.com/todotxt/todo.txt-cli/releases and we already have a todotxt-git package to track current git.

willemw commented on 2021-06-17 15:31 (UTC)

@abouvier: Thanks. Added.

abouvier commented on 2021-06-17 14:25 (UTC)

git is now required in makedepends

Rhinoceros commented on 2021-06-11 08:05 (UTC)

The config file can now be stored in the XDG compliant directory, i.e. ~/.config/todo/config, so it might be worth modifying the install script to reflect this. IMO it's a better location than the home directory.

simona commented on 2020-01-18 18:00 (UTC)

zsh  simona@simonapc1  ~  todo.sh add riga 1 [0] /bin/todo.sh: riga 765: /bin/todo.txt: Permesso negato /bin/todo.sh: riga 766: /bin/done.txt: Permesso negato /bin/todo.sh: riga 767: /bin/report.txt: Permesso negato /bin/todo.sh: riga 793: /bin/todo.txt: Permesso negato sed: impossibile leggere /bin/todo.txt: File o directory non esistente

distefam commented on 2019-09-07 22:19 (UTC)

On my system this installed the config file to /usr/share/todotxt/todo.cfg. I had to move this to ~/.todo/config for the command to work properly.

ginjiro commented on 2017-10-16 00:23 (UTC)

I fixed download url. Thanks AmadoMartinez for reported.

AmadoMartinez commented on 2017-10-14 15:47 (UTC)

THe download url needs to be fixed the correct url is: https://github.com/todotxt/todo.txt-cli/releases/download/v2.10.0/todo.txt_cli-2.10.tar.gz

ginjiro commented on 2017-08-23 04:38 (UTC)

Oops! I don't know that upstream was changed. I fixed pkg source. Thank you for reporting.

ad1217 commented on 2017-08-23 03:37 (UTC)

Just so you know, upstream has moved to https://github.com/todotxt/todo.txt-cli (No new release yet, but you might want to update the URL).

willemw commented on 2016-02-14 14:33 (UTC)

Also, the default user config file seems to be ~/.todo/config, not ~/.todo.cfg.

ginjiro commented on 2016-02-14 14:30 (UTC)

I Fixed license error. Thanks willemw for reported.

willemw commented on 2016-02-14 14:23 (UTC)

Installation fails: ==> ERROR: license should be an array

ginjiro commented on 2015-11-29 04:21 (UTC)

The newest release is version 2.10. (https://github.com/ginatrapani/todo.txt-cli/wiki/Todo.sh-Changelog) So this package is not out-of-date.

darose commented on 2014-07-24 00:29 (UTC)

I guess they changed the config file location again. Looks like the comment should say .todo/config rather than .todo.cfg I'll update the pkg when I have a moment.

vvo commented on 2014-07-23 08:51 (UTC)

Hi, the package installation says: Please note that the config file has changed from ~/.todo to ~/.todo.cfg, and the config file contents have changed slightly since the previous release. Please copy the file /usr/share/todotxt/todo.cfg to ~/.todo.cfg and then edit the TODO_DIR path in that file to your desired todo data directory. But launching todo.sh says: Fatal Error: Cannot read configuration file /home/vvo/.todo/config So: 1. Where does the installation warning comes from after installation? I cannot find any reference to "Please note that the config" .. 2. The configuration warning is not right, config file is now in .todo/config

darose commented on 2014-02-10 03:11 (UTC)

Thanks for pointing that out. Fixed. Sorry for the oversight. (Was an old package build.)

Lastebil commented on 2014-02-09 14:23 (UTC)

You can avoid the warning about the packagebuild not having a package() area by simply changing the build() to package().

darose commented on 2014-02-06 16:42 (UTC)

Updated to v2.10

orschiro commented on 2013-09-20 13:32 (UTC)

How can I use the completion, especially when using an alias such as: alias t='todo.sh -d /home/orschiro/Dropbox/Apps/todotxttdi/todo.cfg -t' I added the following line to .bashrc but this only allows me to use completion for 'todo.sh': source /usr/share/bash-completion/completions/todo.sh

darose commented on 2013-02-22 20:42 (UTC)

Fixed

punk_physicist commented on 2013-02-22 20:29 (UTC)

Line 24 of the PKGBUILD should end with 'todo.sh' rather than 'todo' as the executable is todo.sh (not todo)

darose commented on 2013-02-21 20:54 (UTC)

I just updated the pkg for bash completion. Could someone please test (and report back here) as to whether it works properly or not? (I don't really use todotxt myself anymore.)

frankbe commented on 2013-02-15 17:28 (UTC)

marked package as out of date, because bash completion is not yet included.

commented on 2013-01-26 21:52 (UTC)

As of version 2.9, todotxt now includes bash completion. I have updated PKGBUILD to add that feature in the package. http://pastebin.com/TPabg8SR

donniezazen commented on 2012-04-16 18:21 (UTC)

@darose Thank you for your courtesy.

darose commented on 2012-04-16 17:43 (UTC)

Done. Let me know if any issues.

darose commented on 2012-04-16 14:45 (UTC)

Will update when I get a moment. FYI - all you need to do is flag the package as out-of-date.

donniezazen commented on 2012-04-14 18:52 (UTC)

Please update to 2.9.

darose commented on 2011-10-11 14:14 (UTC)

Updated to 2.8

darose commented on 2011-10-11 02:00 (UTC)

All you need to do is flag the package as out-of-date.

commented on 2011-10-10 23:10 (UTC)

PKGBUILD for the 2.8 version: http://pastebin.com/raw.php?i=NY7QSJxn

darose commented on 2011-03-10 18:27 (UTC)

OK. I backed out that change.

commented on 2011-03-10 09:30 (UTC)

The issue is that i cant tab complete "todo", because theres 2 commands now with todo* and i have to type the whole thing with a space. So if the intension was to make it shorter and easier to type... well, it is not. 2 solutions - get rid of it - install todo.sh to todo if you want it so much

darose commented on 2011-03-10 04:04 (UTC)

Can you provide more detail as to how? It's not something that came from upstream, so I'll be happy to take it out if needed, but I'd like to understand what the issue is first.

commented on 2011-03-09 23:15 (UTC)

this new symlink is just messing up my tab completion

darose commented on 2010-08-16 15:22 (UTC)

Upgraded to v2.7.

darose commented on 2010-05-13 15:07 (UTC)

Upgraded to v2.6.