jschlatow / taskopen

Tool for taking notes and open urls with taskwarrior
GNU General Public License v2.0
363 stars 31 forks source link

sh: line 1: open: command not found #144

Closed gour closed 2 years ago

gour commented 2 years ago

Hello,

I did migrate from Debian to Fedora which has a taskopen package, but when I want to open some annotation I get:

$  taskopen 161
sh: line 1: open: command not found

Here is some info:

taskopen -V

Taskopen, release v1.1.5, revision 297 (b9721f5)
Copyright 2010-2020, Johannes Schlatow.

Environment
    Platform:      linux
    Perl:          v5.34.0
    Taskwarrior:   2.5.3
    xdg-open:      xdg-open 1.1.3+
    Configuration: /home/gour/.taskopenrc

Current configuration
  Binaries and paths:
    BROWSER            = firefox
    TASKBIN            = /usr/bin/task rc.verbose=blank,label,edit rc.json.array=on
    EDITOR             = nvim
    FILE_CMD           = open $FILE
    PATH               = /home/gour/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin

  Others:
    NOTES_FOLDER       = ~/tasknotes/
    NOTES_EXT          = .txt
    NOTES_FILE         = ~/tasknotes/UUID.txt
    NOTES_CMD          = gvim ${FOLDER}UUID$EXT
    DEFAULT_FILTER     = status.is:pending
    DEFAULT_SORT       = 
                current: 
    DEFAULT-i          = ls -la
                current: ls -la
    DEFAULT-x          = $FILE
    DEBUG              = 0
    NOTES_REGEX        = Notes
    BROWSER_REGEX      = www|http
    FILE_REGEX         = \.|\/|~|.*:\/\/
    TEXT_REGEX         = .*
    NO_ANNOTATION_HOOK = 
    TASK_ATTRIBUTES    = 
  Custom regex commands:
cat .taskopenrc
#!/bin/bash

BROWSER='firefox'
TASKBIN='/usr/bin/task'
FILE_CMD='open $FILE'
FILE_REGEX="\.|\/|~|.*:\/\/"

# If you sync tasks FOLDER should be a location that syncs and is available to
# other computers, i.e. /users/dropbox/tasknotes
# FOLDER to store notes in, must already exist!
FOLDER="/home/gour/task/notes"

# Preferred extension for tasknotes
EXT=".txt"

# Message that gets annotated to the task to indicate that notes exist
NOTEMSG="Notes"

# Command that opens notes. UUID will be replaced with the actual uuid of 
# the task.
# Default is: $EDITOR ${FOLDER}UUID$EXT
#NOTES_CMD="$EDITOR ${FOLDER}UUID$EXT"
NOTES_CMD="gvim ${FOLDER}UUID$EXT"
TEXT_REGEX=".*"

and I've the following alias in .taskrc:

alias.open=execute "/usr/bin/taskopen"

Any hint?

jschlatow commented 2 years ago

Hi @gour, your FILE_CMD is overriding the default of using xdg-open to open any file. Instead, your FILE_CMD says that taskopen shall use the open command, which is not available on your system. Please try removing the FILE_CMD line in your .taskopenrc or double-check whether/how you installed the open binary on your Debian machine.

gour commented 2 years ago

Please try removing the FILE_CMD line in your .taskopenrc...

Ahh, that was it. :+1: