A tip for those using bash: Your NRS links (when creating an NRS) need to have quotes around them

RIP one day of my life.

If creating an NRS using the following example command:

./safe nrs create blahblah -l hnyynyi37j94aqudz6jwkpkc1aqrw77at3n6othktuwq31j7g1jbjyq9c1bnc?v=0
zsh: no matches found: hnyynyi37j94aqudz6jwkpkc1aqrw77at3n6othktuwq31j7g1jbjyq9c1bnc?v=0

That zsh error is actually coming from bash, it’s trying to interpret the link you’ve passed via the -l parameter as a filepath because it interprets the question mark as a single wildcard variable (which it only allows in file paths).

You need to wrap them in quotes, a la:

./safe nrs create blahblah -l "hnyynyi37j94aqudz6jwkpkc1aqrw77at3n6othktuwq31j7g1jbjyq9c1bnc?v=0"
New NRS Map for "safe://blahblah" created at: "safe://hnyydyzntc8ny1pobcc5dttp86t4ibk74h31fy7zkeshc6311maia5n4mwbqh"

@bochaco I took the liberty of updating the safe-api/safe-cli readme.md and subcommands/nrs.rs files to present this information to end users so they don’t get confused in the future. The pull request is here: https://github.com/maidsafe/safe-api/pull/418

7 Likes

Ah yes, true, I just reviewed it and merged, thanks a lot @Shane!

4 Likes