mirror of
https://github.com/davidallendj/gdpm.git
synced 2025-12-20 03:27:02 -07:00
Fixed search command not working properly
This commit is contained in:
parent
8a7ada342a
commit
fb7efdd7a4
10 changed files with 143 additions and 120 deletions
|
|
@ -35,16 +35,16 @@
|
|||
namespace gdpm::config{
|
||||
context config;
|
||||
|
||||
string from_style(const print_style& style){
|
||||
if(style == print_style::list) return "list";
|
||||
else if(style == print_style::table) return "table";
|
||||
string from_style(const print::style& style){
|
||||
if(style == print::style::list) return "list";
|
||||
else if(style == print::style::table) return "table";
|
||||
return "list";
|
||||
}
|
||||
|
||||
print_style to_style(const string& s){
|
||||
if(s == "list") return print_style::list;
|
||||
else if(s == "table") return print_style::table;
|
||||
else return print_style::list;
|
||||
print::style to_style(const string& s){
|
||||
if(s == "list") return print::style::list;
|
||||
else if(s == "table") return print::style::table;
|
||||
else return print::style::list;
|
||||
}
|
||||
|
||||
string to_json(
|
||||
|
|
@ -413,7 +413,7 @@ namespace gdpm::config{
|
|||
){
|
||||
using namespace tabulate;
|
||||
|
||||
if(config.style == config::print_style::list){
|
||||
if(config.style == print::style::list){
|
||||
if(properties.empty()){
|
||||
_print_property(config, "username");
|
||||
_print_property(config, "password");
|
||||
|
|
@ -442,7 +442,7 @@ namespace gdpm::config{
|
|||
);
|
||||
}
|
||||
}
|
||||
else if(config.style == config::print_style::table){
|
||||
else if(config.style == print::style::table){
|
||||
Table table;
|
||||
table.add_row({"Property", "Value"});
|
||||
if(properties.empty()){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue