cmdline: Print available protocols when --version is run.
This commit is contained in:
committed by
Max Kellermann
parent
0f64e658fd
commit
e7f034dcef
20
src/ls.c
20
src/ls.c
@@ -24,6 +24,12 @@
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/**
|
||||
* file:// is not included in remoteUrlPrefixes, the connection method
|
||||
* is detected at runtime and displayed as a urlhandler if the client is
|
||||
* connected by IPC socket.
|
||||
*/
|
||||
static const char *remoteUrlPrefixes[] = {
|
||||
#ifdef HAVE_CURL
|
||||
"http://",
|
||||
@@ -40,6 +46,20 @@ static const char *remoteUrlPrefixes[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
void print_supported_uri_schemes_to_fp(FILE *fp)
|
||||
{
|
||||
const char **prefixes = remoteUrlPrefixes;
|
||||
|
||||
#ifdef HAVE_UN
|
||||
fprintf(fp, "file:// ");
|
||||
#endif
|
||||
while (*prefixes) {
|
||||
fprintf(fp, "%s ", *prefixes);
|
||||
prefixes++;
|
||||
}
|
||||
puts("\n");
|
||||
}
|
||||
|
||||
void print_supported_uri_schemes(struct client *client)
|
||||
{
|
||||
const char **prefixes = remoteUrlPrefixes;
|
||||
|
||||
Reference in New Issue
Block a user