class Til::Cli

Public Instance Methods

ag(*args) click to toggle source
# File lib/til/cli.rb, line 81
def ag(*args)
  Til.run_ag_command(*args)
end
cat(subject=nil) click to toggle source
# File lib/til/cli.rb, line 62
def cat(subject=nil)
  if subject
    Til.print_all_notes_in(subject)
  else
    Til.print_all_notes
  end
end
config() click to toggle source
# File lib/til/cli.rb, line 18
def config
  Til.config_settings_file_and_notes_repo
end
edit(keyword="") click to toggle source
# File lib/til/cli.rb, line 30
def edit(keyword="")
  Til.edit_file(keyword, options)
end
git(*args) click to toggle source
# File lib/til/cli.rb, line 71
def git(*args)
  Til.run_git_command(*args)
end
github() click to toggle source
# File lib/til/cli.rb, line 23
def github
  Til.open_github_page_for_repo
end
grep(*args) click to toggle source
# File lib/til/cli.rb, line 76
def grep(*args)
  Til.run_grep_command(*args)
end
last(quantity=1) click to toggle source
# File lib/til/cli.rb, line 57
def last(quantity=1)
  Til.print_most_recent_note quantity.to_i
end
ls(subject = nil) click to toggle source
# File lib/til/cli.rb, line 41
def ls(subject = nil)
  if options[:subjects]
    Til.list_subjects
  elsif subject
    Til.list_notes_in(subject)
  else
    Til.list_all_notes
  end
end
new(subject, title) click to toggle source
# File lib/til/cli.rb, line 35
def new(subject, title)
  Til.new_note(subject, title)
end
pwd() click to toggle source
# File lib/til/cli.rb, line 52
def pwd
  Til.print_working_directory
end
rm(keyword) click to toggle source
# File lib/til/cli.rb, line 86
def rm(keyword)
  Til.remove_file(keyword)
end
version() click to toggle source
# File lib/til/cli.rb, line 12
def version
  require "til/version.rb"
  say "til_cli #{Til::VERSION}"
end