Check-in [d792943681]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:modified help command to output detailed help information when stdout is not a tty (note: branch name changed after consensus seemed to indicate original concept was undesirable)
Timelines: family | ancestors | descendants | both | help-full
Files: files | file ages | folders
SHA3-256: d7929436815ce79285779c5b77525968920762cfc122edeb75f72b56e28b3e2f
User & Date: sdr 2021-02-02 16:01:48.855
Original Comment: modified help command to output detailed help information when stdout is not a tty
Original User & Date: scott 2021-02-02 16:01:48.855
Context
2021-02-02
20:22
modified to not change based on whether destination is a tty, but to provide a help --full option to display all the text at once for those who would like to pipe it through grep / less / capture to a file check-in: 93fd6d3395 user: sdr tags: help-full
16:01
modified help command to output detailed help information when stdout is not a tty (note: branch name changed after consensus seemed to indicate original concept was undesirable) check-in: d792943681 user: sdr tags: help-full
2021-02-01
12:29
Fix typo: added missing word to 'fossil help all' output. check-in: bfa99a9399 user: jamsek tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/dispatch.c.
1039
1040
1041
1042
1043
1044
1045

1046
1047
1048
1049
1050
1051
1052
1053














1054
1055
1056
1057
1058
1059
1060
  int isPage = 0;
  const char *z;
  const char *zCmdOrPage;
  const CmdOrPage *pCmd = 0;
  int useHtml = 0;
  Blob txt;
  if( g.argc<3 ){

    z = g.argv[0];
    fossil_print(
      "Usage: %s help TOPIC\n"
      "Try \"%s help help\" or \"%s help -a\" for more options\n"
      "Frequently used commands:\n",
      z, z, z);
    command_list(0, CMDFLAG_1ST_TIER);
    version_cmd();














    return;
  }
  if( find_option("options","o",0) ){
    fossil_print("%s", zOptions);
    return;
  }
  if( find_option("all","a",0) ){







>
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
  int isPage = 0;
  const char *z;
  const char *zCmdOrPage;
  const CmdOrPage *pCmd = 0;
  int useHtml = 0;
  Blob txt;
  if( g.argc<3 ){
    if( isatty(1) ){
      z = g.argv[0];
      fossil_print(
        "Usage: %s help TOPIC\n"
        "Try \"%s help help\" or \"%s help -a\" for more options\n"
        "Frequently used commands:\n",
        z, z, z);
      command_list(0, CMDFLAG_1ST_TIER);
      version_cmd();
    }
    else {
      fossil_print("fossil commands:\n\n");
      command_list(0, CMDFLAG_1ST_TIER);
      fossil_print("\nfossil auxiliary commands:\n\n");
      command_list(0, CMDFLAG_2ND_TIER);
      fossil_print("\n%s", zOptions);
      fossil_print("\nfossil settings:\n\n");
      command_list(0, CMDFLAG_SETTING);
      fossil_print("\nfossil web pages:\n\n");
      command_list(0, CMDFLAG_WEBPAGE);
      fossil_print("\n");
      version_cmd();
    }
    return;
  }
  if( find_option("options","o",0) ){
    fossil_print("%s", zOptions);
    return;
  }
  if( find_option("all","a",0) ){