Skip to content
This repository has been archived by the owner on Apr 27, 2024. It is now read-only.

Commit

Permalink
Added confirm prompt for remove cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
themagiulio committed May 27, 2023
1 parent 9ea7b2f commit 035d09c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions memos/remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
@click.argument('memo_id')
def remove_command(memo_id):
"""Removes a memo"""
confirm = click.confirm('Are you sure you want to remove this memo?')
if not confirm:
return
deleted = Memo().delete(memo_id)
if not deleted:
click.echo(f'Cannot remove memo with id {memo_id}', err=True)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "memos-cli"
version = "0.1.1"
version = "0.1.2"
description = "A CLI frontend for memos self-hosted memo hub"
authors = ["Giulio De Matteis <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 035d09c

Please sign in to comment.