update ed help message to make s commands make more sense
This commit is contained in:
parent
fa3b1ef748
commit
5aff541fd7
1 changed files with 7 additions and 1 deletions
|
@ -748,6 +748,10 @@ test:
|
|||
fprintf(stderr, "error: invalid number: %s\n", index);
|
||||
break;
|
||||
}
|
||||
if (matches < 1) {
|
||||
fprintf(stderr, "error: matches cannot be less than 1\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
long int sub_len = strlen(replace);
|
||||
long int matches_found = 0;
|
||||
|
@ -827,7 +831,9 @@ static void help() {
|
|||
printf("\t\tq\t\tquit file\n");
|
||||
printf("\t\tQ\t\tquit file unconditionally\n");
|
||||
printf("\t($)\tr file\t\tread file and append to end of buffer\n");
|
||||
printf("\t(.,.)\ts/re/replace/\treplace text at matching regex\n");
|
||||
printf("\t(.,.)\ts/re/replace/\treplace the first match on each matching line\n");
|
||||
printf("\t(.,.)\ts/re/replace/g\treplace all matches on each matching line\n");
|
||||
printf("\t(.,.)\ts/re/replace/n\treplace n matches on each matching line\n");
|
||||
printf("\t(.,.)\tw file\t\twrite contents of lines to file\n");
|
||||
printf("\t(.,.)\twq file\t\twrite contents of lines to file then quit\n");
|
||||
printf("\t(.,.)\tW file\t\tappend contents of line to file\n");
|
||||
|
|
Loading…
Reference in a new issue