navi
navi copied to clipboard
Escape <variable> in cheat files
Is your feature request related to a problem? Please describe.
# build default.nix
nix-build -E 'with import <nixpkgs> {} ; callPackage ./default.nix {}'
this line things of nixpkgs> as a variable, but it actually should stay
Describe the solution you'd like
Best we to escapt <nixpkgs>
some how.
Describe alternatives you've considered
currently I ship around it, by defining
$ nixpkgs: echo "<nixpkgs>"
Thanks for opening your first issue here! In case you're facing a bug, please update navi to the latest version first. Maybe the bug is already solved! :)
Any ideas for escaping? <<foo>>
? maybe \<foo>
?
Suppose we go for <<foo>>
. What if the user really wants to type <<foo>>
(not as a variable)?
I need to think about it haha
Yeah it is not easy I guess. I think \<foo>
is more practical. \\<foo>
=> \<foo>
and \\\<foo>
=> \\<foo>
but this might be short minded.
I ran into this recently as well for work. For me, \<foo>
or \<foo\>
would be fine as I think the majority of CLI heavy workers are used to escaping pairs for one reason or another
:+1: from me for \<foo>
.
I can't guarantee when I'll implement it, though.
This seems to be a simple issue for a newcomer, so if anyone is interested in opening a PR, I'd appreciate it!
Hi! Sorry for the late reply.
Being 100% honest here: this is a feature it would be nice to have but unfortunately I haven't had much free time lately, so I have no plans to implement this in the near future.
If anyone could submit a PR for this, I'll gladly accept it, though! 👍
Seems like this was implemented @denisidoro?
My test:
Cheatsheet:
# test
ssh \<intothisliterally\>
Navi:
~ ❯❯❯ navi ✘ 130
ssh: Could not resolve hostname <intothisliterally>: Name or service not known