mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Use CLI flags spawning CLI opener as default FM
This commit is contained in:
parent
9dee99b456
commit
2276e3ddfd
|
@ -5792,6 +5792,7 @@ int main(int argc, char *argv[])
|
||||||
initpath = "/";
|
initpath = "/";
|
||||||
} else {
|
} else {
|
||||||
arg = argv[optind];
|
arg = argv[optind];
|
||||||
|
DPRINTF_S(arg);
|
||||||
if (strlen(arg) > 7 && !strncmp(arg, "file://", 7))
|
if (strlen(arg) > 7 && !strncmp(arg, "file://", 7))
|
||||||
arg = arg + 7;
|
arg = arg + 7;
|
||||||
initpath = realpath(arg, NULL);
|
initpath = realpath(arg, NULL);
|
||||||
|
@ -5814,7 +5815,7 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
if (S_ISREG(sb.st_mode)) {
|
if (S_ISREG(sb.st_mode)) {
|
||||||
spawn(opener, arg, NULL, NULL, F_NOWAIT);
|
spawn(opener, arg, NULL, NULL, cfg.cliopener ? F_CLI : F_NOTRACE | F_NOWAIT);
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue