fixes in t k usability
This commit is contained in:
parent
63154cc1fc
commit
b3864f3b95
|
@ -48,7 +48,8 @@ impl<'a> Command<'a> for KillCommand {
|
|||
match args {
|
||||
Args::Id(id) => {
|
||||
if let Some(entry) = db.entry_by_id(id)? {
|
||||
writeln!(out, "are you sure you want to delete entry {}? ({}) [y/n]", entry.id, entry.note.unwrap_or("".into()))?;
|
||||
write!(out, "are you sure you want to delete entry {}? ({}) [y/n] ", entry.id, entry.note.unwrap_or("".into()))?;
|
||||
io::stdout().flush()?;
|
||||
|
||||
if read_line().to_lowercase().starts_with("y") {
|
||||
db.delete_entry_by_id(id)?;
|
||||
|
@ -63,7 +64,8 @@ impl<'a> Command<'a> for KillCommand {
|
|||
Args::Sheet(sheet) => {
|
||||
let n = db.entries_by_sheet(&sheet, None, None)?.len();
|
||||
|
||||
writeln!(out, "are you sure you want to delete {} entries on sheet \"{}\"?", n, sheet)?;
|
||||
write!(out, "are you sure you want to delete {} entries on sheet \"{}\"? [y/n] ", n, sheet)?;
|
||||
io::stdout().flush()?;
|
||||
|
||||
if read_line().to_lowercase().starts_with("y") {
|
||||
db.delete_entries_in_sheet(&sheet)?;
|
||||
|
|
Loading…
Reference in New Issue