-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --no-newline option to nu
#12410
Merged
Merged
Conversation
This file contains 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
I have `nu` set as my shell in my editor, which allows me to easily pipe selections of text to things like `str pascal-case` or even more complex string operation pipelines, which I find super handy. However, the only annoying thing is that I pretty much always have to add `| print -n` at the end, because `nu` adds a newline when it prints the resulting value. This adds a `--no-newline` option to stop that from happening, and then you don't need to pipe to `print -n` anymore, you can just have your shell command for your editor contain that flag.
Side note: I also noticed that many of the tests in I think they can also be made to work on all platforms, too; the |
fdncred
reviewed
Apr 5, 2024
Mirrors fixed behavior in nushell#12417
Thanks. |
FilipAndersson245
pushed a commit
to FilipAndersson245/nushell
that referenced
this pull request
Apr 10, 2024
I have `nu` set as my shell in my editor, which allows me to easily pipe selections of text to things like `str pascal-case` or even more complex string operation pipelines, which I find super handy. However, the only annoying thing is that I pretty much always have to add `| print -n` at the end, because `nu` adds a newline when it prints the resulting value. This adds a `--no-newline` option to stop that from happening, and then you don't need to pipe to `print -n` anymore, you can just have your shell command for your editor contain that flag. - Add `--no-newline` command line option - 馃煝 `toolkit fmt` - 馃煝 `toolkit clippy` - 馃煝 `toolkit test` - 馃煝 `toolkit test stdlib`
NotTheDr01ds
pushed a commit
to NotTheDr01ds/nushell
that referenced
this pull request
Apr 12, 2024
# Description I have `nu` set as my shell in my editor, which allows me to easily pipe selections of text to things like `str pascal-case` or even more complex string operation pipelines, which I find super handy. However, the only annoying thing is that I pretty much always have to add `| print -n` at the end, because `nu` adds a newline when it prints the resulting value. This adds a `--no-newline` option to stop that from happening, and then you don't need to pipe to `print -n` anymore, you can just have your shell command for your editor contain that flag. # User-Facing Changes - Add `--no-newline` command line option # Tests + Formatting - 馃煝 `toolkit fmt` - 馃煝 `toolkit clippy` - 馃煝 `toolkit test` - 馃煝 `toolkit test stdlib`
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.
Description
I have
nu
set as my shell in my editor, which allows me to easily pipe selections of text to things likestr pascal-case
or even more complex string operation pipelines, which I find super handy. However, the only annoying thing is that I pretty much always have to add| print -n
at the end, becausenu
adds a newline when it prints the resulting value.This adds a
--no-newline
option to stop that from happening, and then you don't need to pipe toprint -n
anymore, you can just have your shell command for your editor contain that flag.User-Facing Changes
--no-newline
command line optionTests + Formatting
toolkit fmt
toolkit clippy
toolkit test
toolkit test stdlib