Commit 5748d056 by Fred Smith

add rofi interface to todo.txt

parent 9a600ec8
#! /usr/bin/env bash
. ~/dotfiles/bash/todotxt
args=($1)
if [[ ${args[0]} =~ ^-?[0-9]+$ ]]; then
todo.sh do ${args[0]};
todo.sh;
else
if [[ -z "${args[0]}" ]]; then
todo.sh;
else
todo.sh $@;
todo.sh;
fi
fi
......@@ -24,7 +24,8 @@ version() {
# Set script name and full path early.
TODO_SH=$(basename "$0")
TODO_FULL_SH="$0"
export TODO_SH TODO_FULL_SH
TODO_ARGV=$@
export TODO_SH TODO_FULL_SH TODO_ARGV
oneline_usage="$TODO_SH [-fhpantvV] [-d todo_config] action [task_number] [task_description]"
......@@ -32,6 +33,7 @@ usage()
{
cat <<-EndUsage
Usage: $oneline_usage
You said: $TODO_ARGV
Try '$TODO_SH -h' for more information.
EndUsage
exit 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment