Skip to content

Commit

Permalink
Merge pull request ClickHouse#65510 from ClickHouse/local/prompt-with…
Browse files Browse the repository at this point in the history
…out-hostname

clickhouse-local: remove hostname from prompt
  • Loading branch information
thevar1able authored Jun 21, 2024
2 parents 051ca6f + 3b7d69a commit 610b97d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions programs/local/LocalServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -732,11 +732,8 @@ void LocalServer::processConfig()
attachInformationSchema(global_context, *createMemoryDatabaseIfNotExists(global_context, DatabaseCatalog::INFORMATION_SCHEMA_UPPERCASE));
}

server_display_name = config().getString("display_name", getFQDNOrHostName());
prompt_by_server_display_name = config().getRawString("prompt_by_server_display_name.default", "{display_name} :) ");
std::map<String, String> prompt_substitutions{{"display_name", server_display_name}};
for (const auto & [key, value] : prompt_substitutions)
boost::replace_all(prompt_by_server_display_name, "{" + key + "}", value);
server_display_name = config().getString("display_name", "");
prompt_by_server_display_name = config().getRawString("prompt_by_server_display_name.default", ":) ");

global_context->setQueryKindInitial();
global_context->setQueryKind(query_kind);
Expand Down

0 comments on commit 610b97d

Please sign in to comment.