src/bin/psql/command.c
static backslashResult
exec_command_s(PsqlScanState scan_state, bool active_branch)
{
	bool		success = true;

	if (active_branch)
	{
		char	   *fname = psql_scan_slash_option(scan_state,
												   OT_NORMAL, NULL, true);

		expand_tilde(&fname);
		success = printHistory(fname, pset.popt.topt.pager);
		if (success && !pset.quiet && fname)
			printf(_("Wrote history to file \"%s\".\n"), fname);
		if (!fname)
			putchar('\n');
		free(fname);
	}
	else
		ignore_slash_options(scan_state);

	return success ? PSQL_CMD_SKIP_LINE : PSQL_CMD_ERROR;
}
/*
 * \s -- save history in a file or show it on the screen
 */
\s -- save history in a file or show it on the screen
\ s -- save history in a file or show it on the screen
static backslashResult
exec_command_s(PsqlScanState scan_state, bool active_branch)
{
	bool		success = true;
	if (active_branch)
	{
		char	   *fname = psql_scan_slash_option(scan_state,
												   OT_NORMAL, NULL, true);
		expand_tilde(&fname);
		success = printHistory(fname, pset.popt.topt.pager);
		if (success && !pset.quiet && fname)
			printf(_("Wrote history to file \"%s\".\n"), fname);
		if (!fname)
			putchar('\n');
		free(fname);
	}
	else
		ignore_slash_options(scan_state);
	return success ? PSQL_CMD_SKIP_LINE : PSQL_CMD_ERROR;
}
static backslashResult exec_command_s ( PsqlScanState scan_state , bool active_branch ) { bool success = true ; if ( active_branch ) { char * fname = psql_scan_slash_option ( scan_state , OT_NORMAL , NULL , true ) ; expand_tilde ( & fname ) ; success = printHistory ( fname , pset . popt . topt . pager ) ; if ( success && ! pset . quiet && fname ) printf ( _ ( " \" \" \n " ) , fname ) ; if ( ! fname ) putchar ( ' \n ' ) ; free ( fname ) ; } else ignore_slash_options ( scan_state ) ; return success ? PSQL_CMD_SKIP_LINE : PSQL_CMD_ERROR ; }
\s -- save history in a file or show it on the screen
\ s -- save history in a file or show it on the screen