nushell/crates
Taylor 494a5a5286
Add mktemp command (#11005)
closes #10845 

I've opened this a little prematurely to get some questions answered
before I cleanup the code.

As I started trying to better understand GNUs `mktemp` I've realized its
kind of peculiar and we might want to change its behavior to introduce
it to nushell.

#### quiet and dry run

Does it make sense to keep the `quiet` and `dry_run` flags? I don't
think so. The GNU documentation says this about the dry run flag "Using
the output of this command to create a new file is inherently unsafe, as
there is a window of time between generating the name and using it where
another process can create an object by the same name." So yeah why keep
it? As far as quiet goes, does it make sense to silence the errors in
nushell?

#### other confusing flags

According to the [gnu
docs](https://www.gnu.org/software/coreutils/manual/html_node/mktemp-invocation.html),
the `-t` flag is deprecated and the `-p`/ `--tempdir` are the same flag
with the only difference being `--tempdir` takes an optional path, Given
that, I've broken the `-p` away from `--tempdir`. Now there is one
switch `--tmpdir`/`-t` and one named param `--tmpdir-path`/`-p`.

GNU mktemp
```
  -p DIR, --tmpdir[=DIR]  interpret TEMPLATE relative to DIR; if DIR is not
                        specified, use $TMPDIR if set, else /tmp.  With
                        this option, TEMPLATE must not be an absolute name;
                        unlike with -t, TEMPLATE may contain slashes, but
                        mktemp creates only the final component
  -t                  interpret TEMPLATE as a single file name component,
                        relative to a directory: $TMPDIR, if set; else the
                        directory specified via -p; else /tmp [deprecated]

```
to
nushell mktemp
```
  -p, --tmpdir-path <Filepath> # named param, must provide a path
  -t, --tmpdir                 # a switch
```

Is this a terrible idea?

What should I do?

---------

Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
2023-11-17 19:30:53 -06:00
..
nu_plugin_custom_values Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu_plugin_example Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu_plugin_formats Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu_plugin_gstat Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu_plugin_inc Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu_plugin_python remove vectorize_over_list from python plugin (#9905) 2023-08-03 16:46:48 +02:00
nu_plugin_query Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu-cli Apply nightly clippy fixes (#11083) 2023-11-17 09:15:55 -06:00
nu-cmd-base Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu-cmd-dataframe Apply nightly clippy fixes (#11083) 2023-11-17 09:15:55 -06:00
nu-cmd-extra Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu-cmd-lang remove extern-wrapped and export extern-wrapped (#11000) 2023-11-17 06:44:28 +08:00
nu-color-config Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu-command Add mktemp command (#11005) 2023-11-17 19:30:53 -06:00
nu-engine Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu-explore Apply nightly clippy fixes (#11083) 2023-11-17 09:15:55 -06:00
nu-glob Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu-json Apply nightly clippy fixes (#11083) 2023-11-17 09:15:55 -06:00
nu-lsp Apply nightly clippy fixes (#11083) 2023-11-17 09:15:55 -06:00
nu-parser Apply nightly clippy fixes (#11083) 2023-11-17 09:15:55 -06:00
nu-path Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu-plugin Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu-pretty-hex Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu-protocol Apply nightly clippy fixes (#11083) 2023-11-17 09:15:55 -06:00
nu-std std: add cross platform null-device name (#11070) 2023-11-17 14:49:07 +01:00
nu-system bump rust-toolchain to 1.72.1 (#11079) 2023-11-16 15:14:45 -06:00
nu-table optimize/clean up a few of the table changes (#11076) 2023-11-16 11:37:46 -06:00
nu-term-grid Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu-test-support Testing support tweaks: exit status in Outcome (#10692) 2023-11-15 23:50:43 +01:00
nu-utils Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
README.md Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00

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.