From f50d27334f4693e3e8b3ad18cd84b4f460ca9c70 Mon Sep 17 00:00:00 2001 From: Florent Date: Fri, 6 Mar 2026 18:54:16 -0400 Subject: [PATCH] always show 1 byte path on prompt (use path to know the real path) --- src/meshcore_cli/meshcore_cli.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/meshcore_cli/meshcore_cli.py b/src/meshcore_cli/meshcore_cli.py index f481eb5..3f946a0 100644 --- a/src/meshcore_cli/meshcore_cli.py +++ b/src/meshcore_cli/meshcore_cli.py @@ -924,7 +924,13 @@ Some cmds have an help accessible with ?. Do ?[Tab] to get a list. if contact["out_path_len"] == 0: prompt = prompt + f"|0" else: - prompt = prompt + "|" + contact["out_path"] + path = contact['out_path'] + plen = contact['out_path_len'] + phs = contact['out_path_hash_mode'] + 1 + path_str = path[:2] + for i in range(1,plen): + path_str = path_str + path[i*phs*2:i*2*phs+2] + prompt = prompt + "|" + path_str if classic : prompt = prompt + f"{ANSI_NORMAL}>" @@ -3928,6 +3934,8 @@ If you want to set the path for a node through 112233 445566 778899, you can use To set an empty path use 0. +Note that the path shown on the prompt only uses 1 byte notation without commas to keep it slim. + """) else: print(f"Sorry, no help yet for {cmdname}")