Repository navigation
Conversation
horasal
marked this pull request as draft
September 5, 2023 23:58
Contributor
Author
|
hmm, I'll file another pr for fa11fb8 and close this. |
Contributor
|
Trying to get Windows to work right is always the problem because you can have things like |
This was
linked to
issues
Sep 6, 2023
Member
|
not sure about #9310 entirely, just wanted to not forget about it 👍 |
sholderbach
added a commit
that referenced
this pull request
Sep 29, 2023
# Description This merges @horasal 's changes from #10246 and #10269 Closes #10205 Closes #8714 Fixes the bug that editor paths with spaces are unusable Closes #10210 Closes #10269 # User-Facing Changes You can now either pass a string with the name of the executable or a list with the executable and any flags to `$env.config.buffer_editor`/`$env.EDITOR`/`$env.VISUAL` Both the external buffer editor of reedline (by default bound to `Ctrl-o`) and the commands `config nu` and `config env` will respect those variables in the following order: 1. `$env.config.buffer_editor` 2. `$env.EDITOR` 3. `$env.VISUAL` Example: ``` $env.EDITOR = "nvim" # The system-wide EDITOR is neovim $env.config.buffer_editor = ["vim" "-p2"] # Force vim to open two tabs (not particularly useful) $env.config.buffer_editor = null # Unset `buffer_editor` -> Uses `$env.EDITOR` ergo nvim ``` # Tests + Formatting None --------- Co-authored-by: Horasal <[email protected]>
Contributor
Author
hardfau1t
pushed a commit
to hardfau1t/nushell
that referenced
this pull request
Dec 14, 2023
# Description This merges @horasal 's changes from nushell#10246 and nushell#10269 Closes nushell#10205 Closes nushell#8714 Fixes the bug that editor paths with spaces are unusable Closes nushell#10210 Closes nushell#10269 # User-Facing Changes You can now either pass a string with the name of the executable or a list with the executable and any flags to `$env.config.buffer_editor`/`$env.EDITOR`/`$env.VISUAL` Both the external buffer editor of reedline (by default bound to `Ctrl-o`) and the commands `config nu` and `config env` will respect those variables in the following order: 1. `$env.config.buffer_editor` 2. `$env.EDITOR` 3. `$env.VISUAL` Example: ``` $env.EDITOR = "nvim" # The system-wide EDITOR is neovim $env.config.buffer_editor = ["vim" "-p2"] # Force vim to open two tabs (not particularly useful) $env.config.buffer_editor = null # Unset `buffer_editor` -> Uses `$env.EDITOR` ergo nvim ``` # Tests + Formatting None --------- Co-authored-by: Horasal <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #10244
Description
Current
nu-globonly escape glob chars with[], this pr also allows\to escape them. e.g.and user can still use
[[],[*]to escape glob chars.lsis more consistent for folder with glob chars, e.g.User-Facing Changes
User can use either to escape '[', '*', '?':
ls \[test\]ls [[]test[]]Notice: In current implementation,
\need to be escaped ONLY when used with glob, for exampleThis is a glob, so it should be escaped:
But this is not, it's just a raw path string, no
\does not need to be escaped:Should
\always need to be escaped?Tests + Formatting
toolkit fmttoolkit clippytoolkit testtoolkit test stdlibAfter Submitting
As mentioned in #10244, it'll be better to have some documentation about how to use nu-glob.