mirror of
https://github.com/nushell/nushell.git
synced 2025-02-24 14:31:47 +01:00
This PR should close #11693. # Description This PR just adds a '--all' flag to the `clear` command in order to clear the terminal and its history. By default, the `clear` command only scrolls down. In some cases, clearing the history as well can be useful. Default behavior does not change. Even if the `clear` command can be extended form within nushell, having it in out of the box would allow to use it raw, without any customization required. Last but not least, it is pretty easy to implement as it is already supported by the crate which is used to clear the terminal (`crossterm`). Providing relevant screenshot is pretty difficult because the result is the same. In the `clear --all` case, you just cannot scroll back anymore. # User-Facing Changes `clear` just scrolls down as usual without wiping the history of the terminal. ` clear --all` scrolls down and wipe the terminal's history which means scrolling back is no more possible. # Tests + Formatting General formatting and tests pass and have been executed on Linux only. I don't have any way to test it on other systems. There are no specific tests for the `clear` command so I didn't add any (and I am not sure how to do if I had to). Clear command is just a wrapper of the `crossterm` crate Clear command. I would be more than happy if someone else was able to test it in other context (even if it may be good as we rely on the crossterm crate). # After Submitting PR for documentation has been drafted: https://github.com/nushell/nushell.github.io/pull/1266. I'll update it with version if this PR is merged. --------- Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com> |
||
---|---|---|
.. | ||
nu_plugin_custom_values | ||
nu_plugin_example | ||
nu_plugin_formats | ||
nu_plugin_gstat | ||
nu_plugin_inc | ||
nu_plugin_python | ||
nu_plugin_query | ||
nu_plugin_stream_example | ||
nu-cli | ||
nu-cmd-base | ||
nu-cmd-dataframe | ||
nu-cmd-extra | ||
nu-cmd-lang | ||
nu-color-config | ||
nu-command | ||
nu-engine | ||
nu-explore | ||
nu-glob | ||
nu-json | ||
nu-lsp | ||
nu-parser | ||
nu-path | ||
nu-plugin | ||
nu-pretty-hex | ||
nu-protocol | ||
nu-std | ||
nu-system | ||
nu-table | ||
nu-term-grid | ||
nu-test-support | ||
nu-utils | ||
README.md |
Nushell core libraries and plugins
These sub-crates form both the foundation for Nu and a set of plugins which extend Nu with additional functionality.
Foundational libraries are split into two kinds of crates:
- Core crates - those crates that work together to build the Nushell language engine
- Support crates - a set of crates that support the engine with additional features like JSON support, ANSI support, and more.
Plugins are likewise also split into two types:
- Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
- Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.