ttscoff/na

na isn't showing anything

Opened this issue · 12 comments

Hi @ttscoff ,
I've installed na.sh as described (using fixed command [[ -s “$HOME/na.sh” ]] && source “$HOME/na.sh”).
na creates entries as expected, *.taskpaper file gets populated with values given.

But I don't get any tasks shown at all when entering "na". Even issuing na in folder having *.taskpaper file stored.

Any ideas about that?

Thanks!

Do the tasks being added have the @na tag on them?

Generated *.taskpaper file has this content:

Inbox:
        - Update documentation @na
        - [What is still in there?] @na
        - [What is in there?] @na
temp:
        New Features:
        Ideas:
        Bugs:
Archive:
Search Definitions:
        Top Priority @search(@priority = 5 and not @done)
        High Priority @search(@priority > 3 and not @done)
        Maybe @search(@maybe)
        Next @search(@na and not @done and not project = "Archive")
echo $NA_TEXT_TAG

results in

f88ttyc8t@ubuntu:~$ echo $NA_NEXT_TAG
@na

Maybe there is some tool (like awk, sed, ruby library) missing?

Not to have something hidden in my .dotfiles, I've tried it also on a fresh Arch Linux installation (+ installing grep sed awk ruby), but got exact same result. No task list shown at all, $NA_NEXT_TAG is set

echo $NA_NEXT_TAG
@na

Strange thing, issuing "na -h" does not print structured help but a single row of text:
image

Also, I noticed, when cd into subfolder having a *.taskpaper file, command prompt changes it's color (command prompt became green).
I've added a screenshot about this behavior as well as bash configuration used (which is absolutely basic).

image

#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ ' 
#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
[[ -s ~/na.sh ]] && source ~/na.sh

Plus file ~/.tdlist

/home/f8ttyc8t/temp

I hope this is of any help....

@ttscoff ah, thanks!
Will check on my Mac, maybe it works there.

Anyway, if I find a solution I will let you know about.

I the same issue on mac and linux.
$ ./na.sh -h
also gives nothing...

Same here for me on macOS (Big Sur). Tried to debug but my shell fu is weak.

@sorenpeter na is run as a function. Calling the file directly has no effect. Source the file, then call na. If you're using a shell other than Bash, you'll need to write a wrapper function that calls na $@.

@brookscl same thing?

what does "Source the file" mean?

Thanks @ttscoff that worked. Should have realized it was a function... likely the overlap with na.sh and the na function name through me off.

I also had to change some of the hard-coded references to ruby in my copy to make sure it was pulling the proper one from my rbenv.