mirror of
https://github.com/lbonn/rofi
synced 2024-11-15 08:37:17 +00:00
Fix issue #19, accept as argument too
This commit is contained in:
parent
13da91b200
commit
78845b52f4
1 changed files with 3 additions and 0 deletions
|
@ -124,6 +124,9 @@ static pmenu *get_json ( )
|
|||
if (json_input_file[0] == '-' && json_input_file[1] == '\0') {
|
||||
jo = read_json_file_descr(stdin);
|
||||
}
|
||||
else if (json_input_file[0] == '{' && strlen(json_input_file) > 3) {
|
||||
jo = json_tokener_parse(json_input_file);
|
||||
}
|
||||
else
|
||||
{
|
||||
FILE *fd = fopen(json_input_file, "r");
|
||||
|
|
Loading…
Reference in a new issue