Compare commits

..

2 Commits
v0.1 ... master

@ -89,6 +89,8 @@ ssh() {
Do you support `-l` and `-p` parsing? Not yet. That's a great idea me. Do you support `-l` and `-p` parsing? Not yet. That's a great idea me.
What happens if `ssh` changes options? I'll be sad.
## License. ## License.
Pretty much all of this code is straight up copy/pasted from Pretty much all of this code is straight up copy/pasted from

@ -3,6 +3,7 @@
int int
main(int argc, char *argv[]) { main(int argc, char *argv[]) {
int opt; int opt;
printf("Options:");
while ((opt = getopt(argc, argv, "-1246ab:c:e:fgi:kl:m:no:p:qstvx" while ((opt = getopt(argc, argv, "-1246ab:c:e:fgi:kl:m:no:p:qstvx"
"AB:CD:E:F:GI:J:KL:MNO:PQ:R:S:TVw:W:XYy")) != -1) { "AB:CD:E:F:GI:J:KL:MNO:PQ:R:S:TVw:W:XYy")) != -1) {
// Stop processing options after the first positional argument and set // Stop processing options after the first positional argument and set
@ -11,7 +12,13 @@ main(int argc, char *argv[]) {
optind -= 1; optind -= 1;
break; break;
} }
printf(" -%c", opt);
if (optarg != 0) {
printf(" %s", optarg);
}
} }
printf("\n");
if (optind >= argc) { if (optind >= argc) {
fprintf(stderr, "No destination found.\n"); fprintf(stderr, "No destination found.\n");

Loading…
Cancel
Save