Skip to content

Conversation

@ringabout
Copy link
Member

Before

D:\QQPCmgr\Desktop\Nim>nim secret
Hint: used config file 'C:\Users\blue\.choosenim\toolchains\nim-#devel\config\nim.cfg' [Conf]
Hint: used config file 'C:\Users\blue\.choosenim\toolchains\nim-#devel\config\config.nims' [Conf]
.....>>> 12 + 4
16
>>>

After

D:\QQPCmgr\Desktop\Nim>nim secret
Hint: used config file 'C:\Users\blue\.choosenim\toolchains\nim-#devel\config\nim.cfg' [Conf]
Hint: used config file 'C:\Users\blue\.choosenim\toolchains\nim-#devel\config\config.nims' [Conf]
.....
>>> 12 + 4
16
>>>

@Araq Araq merged commit 1e859fa into nim-lang:devel Dec 27, 2020
@timotheecour
Copy link
Member

timotheecour commented Dec 27, 2020

@xflywind
I think we should revert this; this breaks linenoise integration in nim secret, making it painful to use s a REPL.

before this PR: we can use the usual bash/zsh-like navigation to edit cmdline
after this PR: each keyboard interaction (eg left arrow to move cursor when editing cmdline) creates a newline

The (minor) annoyance you're observing is fixable though.

links

@ringabout
Copy link
Member Author

ringabout commented Dec 27, 2020

Let me think.
Could you give me some screenshots?

I will fix this differently soon.

@timotheecour
Copy link
Member

timotheecour commented Dec 27, 2020

image

after clicking on left arrow a few times:

image

(might be easier to fix in a linux vm to see this behavior rather than windows ;-) )

@ringabout
Copy link
Member Author

Oh, I see.

@ringabout ringabout self-assigned this Dec 27, 2020
@timotheecour
Copy link
Member

timotheecour commented Dec 27, 2020

in future work, we should probably add some tests for nim secret (at least a few basic ones, to prevent regressions); this should be doable despite stdin interaction using osproc (iirc inim has some like that but this can be done rather simply)

(EDIT: basic tests in #16495)

@ringabout

This comment has been minimized.

@ringabout
Copy link
Member Author

How to compile nimsecret quick? It's painful to debug it.
I use koch temp --d:useLinenoise secret now.

@ringabout
Copy link
Member Author

It is reverted now.
#16483

ringabout added a commit that referenced this pull request Dec 27, 2020
* minor

* Revert "minor"

This reverts commit ef1807c.
@krux02
Copy link
Contributor

krux02 commented Dec 27, 2020

Use nim secret in Linux, when pressing up button

use rlwrap like this: rlwrap nim secret, and up button will provide you access to history. Also editing works it even has a vi mode if you care about that. You need to install rlwrap though.

@ringabout
Copy link
Member Author

thanks

mildred pushed a commit to mildred/Nim that referenced this pull request Jan 11, 2021
mildred pushed a commit to mildred/Nim that referenced this pull request Jan 11, 2021
* minor

* Revert "minor"

This reverts commit ef1807c.
ardek66 pushed a commit to ardek66/Nim that referenced this pull request Mar 26, 2021
ardek66 pushed a commit to ardek66/Nim that referenced this pull request Mar 26, 2021
* minor

* Revert "minor"

This reverts commit ef1807c.
@ringabout ringabout deleted the 人间有味是清欢 branch February 25, 2022 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants