1 # Copyright (C) 2021 all contributors <meta@public-inbox.org>
2 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
4 # "lei forget-search" forget/remove a saved search "lei q --save"
5 package PublicInbox::LeiForgetSearch;
8 use PublicInbox::LeiSavedSearch;
9 use PublicInbox::LeiUp;
13 sub lei_forget_search {
15 my $d = PublicInbox::LeiSavedSearch::lss_dir_for($lei, \$out);
18 my $opt = { safe => 1 };
19 if ($lei->{opt}->{verbose}) {
21 $save = SelectSaver->new($lei->{2});
23 File::Path::remove_tree($d, $opt);
25 $lei->fail("--save was not used with $out cwd=".
30 *_complete_forget_search = \&PublicInbox::LeiUp::_complete_up;