Skip to content

Commit

Permalink
feat: add home subcommand for goto web page
Browse files Browse the repository at this point in the history
  • Loading branch information
yuler committed Nov 15, 2021
1 parent 7bf0ec9 commit 17418ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ The `gh todo` or `gh todo list` where show todo list.
gh todo --help
# create `todo` repo
gh todo init
# goto `issues` web page
gh todo home
# show todo list
gh todo
# add todo item
Expand Down
8 changes: 8 additions & 0 deletions gh-todo
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ init() {
exec gh repo create --confirm --private --template=yuler/template-todo todo
}

home() {
gh issue list --web --repo $repo
}

add() {
input="$1"
issue_id=$(get_issue_id)
Expand Down Expand Up @@ -71,6 +75,10 @@ while [ $# -gt 0 ]; do
init
shift
;;
home)
home
shift
;;
add)
if [[ -z "$2" ]]; then
echo -n "[Enter]: "
Expand Down

0 comments on commit 17418ad

Please sign in to comment.