summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/man/gnunet-identity.12
-rw-r--r--src/identity/gnunet-identity.c16
2 files changed, 17 insertions, 1 deletions
diff --git a/doc/man/gnunet-identity.1 b/doc/man/gnunet-identity.1
index 4a8970cf5..e51bbc85d 100644
--- a/doc/man/gnunet-identity.1
+++ b/doc/man/gnunet-identity.1
@@ -63,6 +63,8 @@ Perform "set" operation with the respective ego or restrict "display" operation
Print the help page.
.It d | \-display
Display all of our egos.
+.It q | \-quiet
+Be quiet, in particular outputs only the public key when listing egos.
.It v | \-verbose
Be verbose, in particular outputs the public key of freshly created egos.
.It m | \-monitor
diff --git a/src/identity/gnunet-identity.c b/src/identity/gnunet-identity.c
index 8366b9918..635c59efd 100644
--- a/src/identity/gnunet-identity.c
+++ b/src/identity/gnunet-identity.c
@@ -56,6 +56,11 @@ static int monitor;
static unsigned int verbose;
/**
+ * Was "quiet" specified?
+ */
+static int quiet;
+
+/**
* -C option
*/
static char *create_ego;
@@ -293,7 +298,12 @@ print_ego (void *cls,
GNUNET_IDENTITY_ego_get_public_key (ego, &pk);
s = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk);
if ((monitor) || (NULL != identifier))
- fprintf (stdout, "%s - %s\n", identifier, s);
+ {
+ if (quiet)
+ fprintf (stdout, "%s\n", s);
+ else
+ fprintf (stdout, "%s - %s\n", identifier, s);
+ }
GNUNET_free (s);
}
@@ -354,6 +364,10 @@ main (int argc, char *const *argv)
"display",
gettext_noop ("display all egos"),
&list),
+ GNUNET_GETOPT_option_flag ('q',
+ "quiet",
+ gettext_noop ("reduce output"),
+ &quiet),
GNUNET_GETOPT_option_string (
'e',
"ego",