* \? -- print help about backslash commands */
| 2789 | * \? -- print help about backslash commands |
| 2790 | */ |
| 2791 | static backslashResult |
| 2792 | exec_command_slash_command_help(PsqlScanState scan_state, bool active_branch) |
| 2793 | { |
| 2794 | if (active_branch) |
| 2795 | { |
| 2796 | char *opt0 = psql_scan_slash_option(scan_state, |
| 2797 | OT_NORMAL, NULL, false); |
| 2798 | |
| 2799 | if (!opt0 || strcmp(opt0, "commands") == 0) |
| 2800 | slashUsage(pset.popt.topt.pager); |
| 2801 | else if (strcmp(opt0, "options") == 0) |
| 2802 | usage(pset.popt.topt.pager); |
| 2803 | else if (strcmp(opt0, "variables") == 0) |
| 2804 | helpVariables(pset.popt.topt.pager); |
| 2805 | else |
| 2806 | slashUsage(pset.popt.topt.pager); |
| 2807 | |
| 2808 | if (opt0) |
| 2809 | free(opt0); |
| 2810 | } |
| 2811 | else |
| 2812 | ignore_slash_options(scan_state); |
| 2813 | |
| 2814 | return PSQL_CMD_SKIP_LINE; |
| 2815 | } |
| 2816 | |
| 2817 | |
| 2818 | /* |
no test coverage detected