summaryrefslogtreecommitdiffstats
path: root/fish2024/functions/_mealplan.fish
blob: 30c8a20831c594f6a124f3774aa3c113a8ef25fd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function _mealplan
  #set -l cmd "grep Monday ~/Documents/Notes/2.Areas/Health/Breakfast_and_Lunch_Plan_IBD.md|cut -d: -f3"
  if test -z $argv[1]
    echo "Usage: mealplan <day> <meal>"
    echo "  day: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday"
    echo "  meal: b, l, t"
    return
  end

  set -l day $argv[1]

  if test $argv[2] = "b"
    set -f meal "-f2"
  else if test $argv[2] = "l"
    set -f meal "-f3"
  else if test $argv[2] = "t"
    set -f meal "-f4"
  end
  echo (grep -i $day ~/Documents/Notes/2.Areas/Health/Breakfast_and_Lunch_Plan_IBD.md|cut -d: $meal)
end