patch: open-selected
This commit is contained in:
10
st.c
10
st.c
@@ -1887,6 +1887,16 @@ csihandle(void)
|
||||
term.c.y+1, term.c.x+1);
|
||||
ttywrite(buf, len, 0);
|
||||
break;
|
||||
case 7:
|
||||
if (strstr(strescseq.args[1], "file://") != strescseq.args[1]) {
|
||||
fprintf(stderr, "erresc: dir %s must have prefix 'file://'\n",
|
||||
strescseq.args[1]);
|
||||
return;
|
||||
}
|
||||
if (chdir(strescseq.args[1] + 7) != 0) /* +7 to remove prefix */
|
||||
fprintf(stderr, "erresc: invalid directory %s\n",
|
||||
strescseq.args[1]);
|
||||
return;
|
||||
default:
|
||||
goto unknown;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user