mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-20 03:25:47 +00:00
procroller: don't recurse on argv[0], whoops
This commit is contained in:
parent
24dae2cf15
commit
ba8d80d444
@ -37,7 +37,7 @@ eofcb(struct ncfdplane* ncfd, int nerrno, void* curry){
|
|||||||
|
|
||||||
int main(int argc, char** argv){
|
int main(int argc, char** argv){
|
||||||
if(argc < 2){
|
if(argc < 2){
|
||||||
fprintf(stderr, "usage: procroller binary [ args... ]\n");
|
fprintf(stderr, "usage: %s binary [ args... ]\n", *argv);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
@ -49,6 +49,7 @@ int main(int argc, char** argv){
|
|||||||
if(nc == NULL){
|
if(nc == NULL){
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
++argv;
|
||||||
struct ncplane* n = notcurses_stdplane(nc);
|
struct ncplane* n = notcurses_stdplane(nc);
|
||||||
ncsubproc_options nopts = {};
|
ncsubproc_options nopts = {};
|
||||||
struct ncsubproc* nsproc = ncsubproc_createvp(n, &nopts, *argv, argv, cb, eofcb);
|
struct ncsubproc* nsproc = ncsubproc_createvp(n, &nopts, *argv, argv, cb, eofcb);
|
||||||
|
Loading…
Reference in New Issue
Block a user