na icon indicating copy to clipboard operation
na copied to clipboard

na isn't showing anything

Open f8ttyc8t opened this issue 6 years ago • 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!

f8ttyc8t avatar Jun 13 '19 14:06 f8ttyc8t

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

ttscoff avatar Jun 13 '19 14:06 ttscoff

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")

f8ttyc8t avatar Jun 13 '19 14:06 f8ttyc8t

And have you changed the default environment variables at all?

Try echo $NA_NEXT_TAG and see if it says "@na"

-Brett

On 13 Jun 2019, at 9:54, f8ttyc8t wrote:

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")

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/ttscoff/na/issues/11#issuecomment-501738503

ttscoff avatar Jun 13 '19 20:06 ttscoff

echo $NA_TEXT_TAG

results in

f88ttyc8t@ubuntu:~$ echo $NA_NEXT_TAG
@na

f8ttyc8t avatar Jun 14 '19 06:06 f8ttyc8t

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....

f8ttyc8t avatar Jun 14 '19 06:06 f8ttyc8t

It's entirely possible that there's a missing piece. I've only ever tested this on macOS, and can't really debug other systems.

-Brett

On 14 Jun 2019, at 1:58, f8ttyc8t wrote:

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

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/ttscoff/na/issues/11#issuecomment-501993167

ttscoff avatar Jun 14 '19 12:06 ttscoff

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

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

f8ttyc8t avatar Jun 14 '19 12:06 f8ttyc8t

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

sorenpeter avatar May 03 '20 14:05 sorenpeter

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

brookscl avatar Jan 16 '21 21:01 brookscl

@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?

ttscoff avatar Jan 17 '21 18:01 ttscoff

what does "Source the file" mean?

sorenpeter avatar Jan 17 '21 21:01 sorenpeter

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.

brookscl avatar Jan 17 '21 22:01 brookscl