simplify listfile

This commit is contained in:
speedie 2023-05-08 17:33:55 +02:00
parent a2ab37dbc3
commit 5c36c25f99
2 changed files with 7 additions and 10 deletions

View file

@ -8,6 +8,11 @@ void readstdin(void) {
return;
}
if (listfile) {
readfile();
return;
}
int o = 0;
// read each line from stdin and add it to the item list

View file

@ -751,17 +751,9 @@ int main(int argc, char *argv[]) {
// fast (-f) means we grab keyboard before reading standard input
if (fast && !isatty(0)) {
grabkeyboard();
if (!listfile)
readstdin();
else
readfile();
readstdin();
} else {
if (listfile)
readfile();
else
readstdin();
readstdin();
grabkeyboard();
}