mirror of
https://github.com/meshcore-dev/meshcore-cli.git
synced 2026-04-20 22:13:48 +00:00
always show 1 byte path on prompt (use path to know the real path)
This commit is contained in:
parent
ba988a7489
commit
f50d27334f
1 changed files with 9 additions and 1 deletions
|
|
@ -924,7 +924,13 @@ Some cmds have an help accessible with ?<cmd>. 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}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue