82d450de5967d1fb2144d3181c616a428928fa1c — Simon Ser 10 days ago 986ec39
builtin/export: make readonly -p only print read-only params

Closes: https://github.com/emersion/mrsh/issues/132
1 files changed, 1 insertions(+), 1 deletions(-)

M builtin/export.c
M builtin/export.c => builtin/export.c +1 -1
@@ 20,7 20,7 @@ int builtin_export(struct mrsh_state *state, int argc, char *argv[]) {
 	} else if (argc == 2 && strcmp(argv[1], "-p") == 0) {
 		size_t count;
 		struct mrsh_collect_var *vars = collect_vars(
-			state, MRSH_VAR_ATTRIB_EXPORT, &count);
+			state, attrib, &count);
 		for (size_t i = 0; i < count; ++i) {
 			printf("%s %s=", argv[0], vars[i].key);
 			print_escaped(vars[i].value);