check bookmarkname != 'add' || 'remove'
This commit is contained in:
@@ -195,6 +195,9 @@ fn add_bookmarks(args: &BookmarkSubArgs, config: &Config, bookmarks: &mut Bookma
|
||||
Ok(value) => value,
|
||||
Err(error) => return Err(Error::other(error.to_string())),
|
||||
};
|
||||
if args.name == "add" || args.name == "remove" {
|
||||
return Err(Error::other("-- `add` & `remove` are subcommands and cant be used as bookmarknames"));
|
||||
}
|
||||
bookmarks.add_bookmark(&args.name, &path)?;
|
||||
|
||||
if config.general.show_books_on_bookmark {
|
||||
|
||||
Reference in New Issue
Block a user