Commit Graph

386 Commits

Author SHA1 Message Date
Tobias Tschinkowitz
3a6a3d7409
Implement login for the fetch command (#1915) 2020-05-30 11:22:38 +12:00
Andrés N. Robalino
48ee20782f Ensure end_filter plugin lifecycle stage gets called. 2020-05-29 04:03:25 -05:00
Jonathan Turner
360e8340d1
Move run to be async (#1913) 2020-05-29 20:22:52 +12:00
Jonathan Turner
3f9871f60d
Simplify plugin directory scanning (#1910) 2020-05-29 07:14:32 +12:00
Andrés N. Robalino
fe01a223a4 Str plugin promoted to built-in Nu command. 2020-05-28 11:18:58 -05:00
Jason Gedge
0a6692ac44
Simplify parse plugin code. (#1904)
Primarily, instead of building a parse pattern enum, we just build the regex
directly, with the appropriate capture group names so that the column name
codepaths can be shared between simple and `--regex` patterns.

Also removed capture group count compared to column name count. I don't think
this codepath can possibly be reached with the regex we now use for the
simplified capture form.
2020-05-28 09:58:06 -04:00
Jonathan Turner
98a3d9fff6
Allow echo to iterate ranges (#1905) 2020-05-28 06:07:53 +12:00
Jonathan Turner
e2dabecc0b Make it-expansion work when in a list (#1903) 2020-05-27 20:29:05 +12:00
Joseph T. Lyons
49b0592e3c
Implement ctrl+c for the du command (#1901)
* Implement ctrl+c for the du command

* Ignore the "too many arguments" Clippy warning
2020-05-27 16:52:20 +12:00
Jonathan Turner
fa812849b8
Fix warnings and split Scope (#1902) 2020-05-27 16:50:26 +12:00
k-brk
9567c1f564
Fix for inconsistency when quoted strings are used with with_env shorthand (#1900) 2020-05-26 15:03:55 -04:00
Joseph T. Lyons
a915471b38
Cal documentation updates (#1895) 2020-05-26 07:21:36 -04:00
Darren Schroeder
f0fc9e1038
Merge pivot options (#1888) 2020-05-25 18:40:25 -04:00
Jason Gedge
cb6ccc3c5a
Improve the simplified parse form. (#1875) 2020-05-25 14:19:49 -04:00
Joseph T. Lyons
07996ea93d
Remove as many of the typecasts as possible in the cal command (#1886)
* Remove as many of the typecasts as possible in the cal command

* Run rustfmt on cal.rs
2020-05-25 18:51:23 +12:00
Jason Gedge
005d76cf57
Fix broken ordering of args when parsing command with env vars. (#1841) 2020-05-24 19:26:27 -04:00
k-brk
8a99d112fc
Add --to-float to str plugin (#1872) 2020-05-24 18:11:49 -04:00
Shaarad Dalvi
9c14fb6c02
Show error when trying to sort by invalid column (#1880)
* Show error when trying to sort by invalid column

* Added test for changes

* Addressed comments, updated test

* Removed unnecessary mutable keyword

* Changed split-column to solt column after rebase from upstream
2020-05-25 05:37:08 +12:00
Andrés N. Robalino
edbecda14d Split split command to sub commands. 2020-05-24 02:02:44 -05:00
Aaron Christiansen
74c2daf665
Add completion for binaries on PATH (#1866) 2020-05-23 20:27:52 -04:00
Alexander James
aadbcf5ce8
Issue 1787 (#1827) 2020-05-23 20:08:39 -04:00
Kelli Little
460daf029b
Add space to bottom of table in 'light' mode (#1871) 2020-05-22 21:12:26 -04:00
Oleksii Filonenko
9e6ab33fd7
Add --regex flag to parse (#1863) 2020-05-22 10:13:58 -04:00
Darren Schroeder
5de30d0ae5
Tweak auto-rotate for single row output (#1861)
* added helper to convert data to strings
added ability to auto-rotate single row output
if row will be greater than terminal width

* Added pivot_to_fit config value

* Added ColumnPath to convert_to_string helper

* Figured out I had to run `cargo fmt --all -- --check`

Co-authored-by: Darren Schroeder <fdncred@hotmail.com>
2020-05-22 04:30:58 +12:00
Aaron Christiansen
97b9c078b1
Fix completer handling of paths with spaces (#1858)
* Fix completer handling of paths with spaces

* Satisfy Clippy for completer

* Satisfy cargo fmt for completer
2020-05-21 08:32:21 +12:00
Elton Leander Pinto
8dc5c34932
Save alias (#1852)
* figuring out error with lines

* make progress in printing of block

* support for external commands; fix some tiny bugs in formatting

* basic printing of block; going to experiment with bubbling raw input to the command itself to avoid potential edge cases

* remove fmt::Display impls for hir structs; bubbled raw_input to command args

* compiling checkpoint :)

* process raw input alias to remove save flag; do duplicates stored

* fix warnings; run clippy

* removed tmux log file

* fix bug in looking for same alias; changed unwraps to safe unwraps
2020-05-21 05:31:04 +12:00
Joseph T. Lyons
3239e5055c
Added a count column on the histogram command (#1853)
* Adding iniitial draft for the addition of the count column on the histogram command

* Update histogram documentation

* Add count column test to histogram command

* Fix error in histogram documentation
2020-05-20 18:02:36 +12:00
James Campos
ae8c864934
default history size to 100k (#1845) 2020-05-20 07:28:06 +12:00
Jonathan Turner
ed80933806
String interpolation (#1849)
* Add string interpolation

* fix coloring

* A few more fixups + tests

* merge master again
2020-05-20 07:27:26 +12:00
Chris Pearce
ae87582cb6
Fix missing invocation errors (#1846) 2020-05-19 08:57:25 -04:00
Jonathan Turner
b89976daef
let format access variables also (#1842) 2020-05-19 16:20:09 +12:00
lightclient
3144dc7f93
add support for specifying max history size in config (#1829) (#1837) 2020-05-19 10:27:08 +12:00
Jason Gedge
6efabef8d3
Remove interpretation of Primitive::Nothing as the number 0. (#1836) 2020-05-18 15:18:46 -04:00
Jonathan Turner
0743b69ad5
Move from language-reporting to codespan (#1825) 2020-05-19 06:44:27 +12:00
Jason Gedge
5f1136dcb0
Fix newly added examples. (#1830) 2020-05-18 11:40:44 -04:00
Jason Gedge
acf13a6fcf
Add (near) automatic testing for command examples (#1777) 2020-05-18 08:56:01 -04:00
Sam
3fc4a9f142
added config check to disable auto pivoting of single row outputs (#1791)
* added config check to disable auto pivoting of single row outputs

* fixed change to use built-in boolean values
2020-05-18 20:42:22 +12:00
Shaurya Shubham
b6cdfb1b19
Remove the -n flag from shuffle (#1823) 2020-05-18 19:12:35 +12:00
Joseph T. Lyons
334685af23
Add some examples (#1821)
* Adds some examples

* Run rustfmt

* Fixed a few descriptions in the examples
2020-05-18 19:11:37 +12:00
Jonathan Turner
c475be2df8
Fix starship not getting the correct pwd (#1822) 2020-05-18 17:22:54 +12:00
Andrés N. Robalino
f18424a6f6 Remove test-bins feature. 2020-05-17 23:32:55 -05:00
John Erickson
d1b1438ce5
Check capture group count (#1814) 2020-05-17 14:52:17 -04:00
Joseph T. Lyons
af6aff8ca3
Allow user to specify the indentation setting on the pretty flag for the to json command (#1818)
* Allow user to specify the indentation setting on the pretty flag for the to json command

* Use "JSON" over "json"
2020-05-18 06:48:58 +12:00
Kurtis
d4dd8284a6
create Palette trait (#1813)
* create Pallet trait

* correct spelling to palette

* move palette to it's own module
2020-05-18 05:48:57 +12:00
Shaurya Shubham
41e1aef369
Fix the insert command (#1815) 2020-05-17 08:30:52 -04:00
Joseph T. Lyons
e50db1a4de
Adds support to pretty format the json in to json (#1812)
* Current work on the --pretty flag for to json

* Deleted notes that were pushed by accident

* Fixed some errors
2020-05-17 16:43:10 +12:00
Jonathan Turner
0abc94f0c6
Bump some of our dependencies (#1809) 2020-05-17 10:34:10 +12:00
Jonathan Turner
48d06f40b1
Remove the old it-hacks from fetch and post (#1807) 2020-05-17 06:18:46 +12:00
Jonathan Turner
f43ed23ed7
Fix parsing of invocations with a dot (#1804) 2020-05-16 19:25:18 +12:00
Joseph T. Lyons
40ec8c41a0
Cal command updates (#1758)
* Calculate the quarter directly

* Group some data together, remove attribute to ignore Clippy warning

* Group items into structs and add methods

* Updates to cal command

* Update cal.rs

* Update cal.rs

Co-authored-by: Jonathan Turner <jonathandturner@users.noreply.github.com>
2020-05-16 16:00:06 +12:00
Jonathan Turner
076fde16dd
Evaluation of command arguments (#1801)
* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* Finish adding the baseline refactors for argument invocation

* Finish cleanup and add test

* Add missing plugin references
2020-05-16 15:18:24 +12:00
Sam
822440d5ff
added nothing value for incalcuable dir sizes (#1789) 2020-05-15 12:53:18 -04:00
Andrés N. Robalino
fc8ee8e4b9
Extracted grouping by date to it's own subcommand. (#1792) 2020-05-15 04:16:09 -05:00
Xavier L'Heureux
5fbe5cf785
Use the directories crate instead of app_dirs (#1782)
The app_dirs crate is abandonned since quite a bit of time. Use the directories
crate instead, which is maintained and have more OS support.
2020-05-14 20:17:23 +12:00
Michael Nitschinger
e7f08cb21d
Allow external binary to register custom commands. (#1780)
This changeset contains everything that a separate binary needs to
register its own commands (including the new help function). It is
very possible that this commit misses other pub use exports, but
the contained ones work for our use cases so far.
2020-05-14 12:35:22 +12:00
Hoàng Đức Hiếu
e3b7e47515
cal: fix thursday typo (#1776) 2020-05-13 08:06:31 -04:00
Jonathan Turner
196991ae1e
Bump to 0.14.1 (#1772) 2020-05-13 20:03:45 +12:00
Joseph T. Lyons
9700b74407
Fix type in config flag description (#1769) 2020-05-13 14:21:57 +12:00
Bruno Heridet
803c6539eb
doc: fix nth examples (#1768) 2020-05-12 16:47:45 -04:00
Jason Gedge
75edcbc0d0
Simplify mv in FilesystemShell (#1587) 2020-05-12 16:40:45 -04:00
Jonathan Turner
b2eecfb110
Bump to 0.14 (#1766) 2020-05-13 04:32:51 +12:00
Jason Gedge
b0aa142542
Add examples for some more commands (#1765) 2020-05-13 03:54:29 +12:00
Bruno Heridet
247d8b00f8
doc: fix prepend example definition (#1761)
It seems that the description was copy-pasted by mistake from the
append command.
2020-05-12 19:46:21 +12:00
Jonathan Turner
0b520eeaf0
Add a batch of help examples (#1759) 2020-05-12 17:17:17 +12:00
Jonathan Turner
c3535b5c67
It-expansion fixes (#1757)
* It-expansion fixes

* fix clippy
2020-05-12 15:58:16 +12:00
Jonathan Turner
8b9a8daa1d
Add a batch of help examples (#1755) 2020-05-12 13:00:55 +12:00
Jonathan Turner
c5ea4a31bd
Adding coloring to help examples (#1754) 2020-05-12 11:06:40 +12:00
Jonathan Turner
2275575575
Improve list view and ranges (#1753) 2020-05-12 08:06:09 +12:00
Elichai Turkel
c3a066eeb4
Add examples to commands (#1752)
* Pass &dyn WholeStreamCommand to get_help

* Add an optional example to the WholeStreamCommand trait

* Add an example to the alias command
2020-05-12 08:05:44 +12:00
Jonathan Turner
42eb658c37
Add a simplified list view (#1749) 2020-05-11 14:47:27 +12:00
Jonathan Turner
a2e9bbd358
Improve duration math and printing (#1748)
* Improve duration math and printing

* Fix test
2020-05-11 13:44:49 +12:00
Joseph T. Lyons
f702aae72f
Don't include year and month by default, adds an option to display th… (#1745)
* Don't include year and month by default, adds an option to display the quarters of the year

* Add a test for cal that checks that year requested is in the return

* rustfmt the cal tests
2020-05-11 12:35:24 +12:00
Joseph T. Lyons
f5e03aaf1c
Add cal command (#1739)
* Add cal command

* Fix docmentation to show commands on two lines

* Use bullet points on flag documentation for cal

* Dereference day before calling string method

* Silence Clippy warning regarding a function with too many arguments

* Update cal flag descriptions and documentation

* Add some tests for the cal command
2020-05-10 11:05:48 +12:00
Jonathan Turner
0f0847e45b
Move 'start' to use ShellError (#1743)
* Move 'start' to use ShellError

* Remove unnecessary changes

* Add missing macOS change

* Add default

* More fixed

* More fixed
2020-05-10 08:08:53 +12:00
Elton Leander Pinto
ccd5d69fd1
Bug fix start (#1738)
* fix bug on linux; added start to the stable list

* add to stable and fix clippy lint
2020-05-10 05:28:57 +12:00
chrisr
55374ee54f
Fix help text for alias command. (#1742)
* Fix help text for alias command.

* Rust fmt
2020-05-09 12:16:14 -05:00
Andrés N. Robalino
f93ff9ec33
Make grouping more flexible. (#1741) 2020-05-09 12:15:47 -05:00
Elton Leander Pinto
9a94b3c656
start command in nushell (#1727)
* mvp for start command

* modified the signature of the start command

* parse filenames

* working model for macos is done

* refactored to read from pipes

* start command works well on macos; manual testing reveals need of --args flag support

* implemented start error; color printing of warning and errors

* ran clippy and fixed warnings

* fix a clippy lint that was caught in pipeline

* fix dead code clippy lint for windows

* add cfg annotation to import
2020-05-09 06:19:48 +12:00
Andrés N. Robalino
180c1204f3
Use playground instead of depending on fixture format files. (#1726) 2020-05-07 06:58:35 -05:00
Andrés N. Robalino
96e5fc05a3
Pick->Select rename. Integration tests changes. (#1725)
Pick->Select rename. Integration tests changes.
2020-05-07 06:03:43 -05:00
Andrés N. Robalino
c3efdf2689
Rename edit command to update. (#1724)
Rename edit command to update.
2020-05-07 00:33:30 -05:00
Jason Gedge
27fdef5479
Read exit status before failing in failed read from stdout pipe (#1723) 2020-05-07 13:42:01 +12:00
Jonathan Turner
7ce8026916
Ignore empty arguments passed to externals (#1722) 2020-05-07 09:18:56 +12:00
Jonathan Turner
8a9fc6a721
Fix changing to a new Windows drive (#1721)
* Fix changing to a new Windows drive

* Update cli.rs
2020-05-07 05:51:03 +12:00
Jonathan Turner
c06a692709
Bash-like shorthand with-env (#1718)
* Bash-like shorthand with-env

* fix clippy warning
2020-05-06 18:57:37 +12:00
Jonathan Turner
b37e420c7c
Add with-env command (#1717) 2020-05-06 15:56:31 +12:00
Jörn Zaefferer
3201c90647
Extend to/from usage text to indicate subcommands (#1711)
Both to and from without a subcommand only print the helptext. Expand the usage line a bit, so a glance at `help commands` indicates the existance of the subcommands and mentions some common formats.

Ref a9968046ed
Ref #1708
2020-05-05 09:00:29 +12:00
Jonathan Turner
454f560eaa
Properly deserialize history args (#1710) 2020-05-05 07:50:10 +12:00
Darren Schroeder
d2ac506de3
Changes to allow plugins to be loaded in a multi-threaded manner (#1694)
* Changes to allow plugins to be loaded in a multi-threaded manner in order to decrease startup time.

* Ran rust fmt and clippy to find and fix first pass errors.
Updated launch.jason to make debugging easier in vscode.
Also added tasks.json so tasks like clippy can be ran easily.

* ran fmt again

* Delete launch.json

Remove IDE settings file

* Remove IDE settings file

* Ignore vscode IDE settings

* Cloned the context instead of Arc/Mutexing it.

Co-authored-by: Darren Schroeder <fdncred@hotmail.com>
Co-authored-by: Jonathan Turner <jonathandturner@users.noreply.github.com>
2020-05-05 06:15:24 +12:00
Jonathan Turner
a9968046ed
Add subcommands. Switch from-* and to-* to them (#1708) 2020-05-04 20:44:33 +12:00
Jonathan Turner
453087248a
Properly drain iterating pipe so we can see errors (#1707) 2020-05-04 15:29:32 +12:00
Joseph T. Lyons
81ff598d6c
Fix column bugs associated with previous refactoring (#1705)
* Fix: the symlink target column will only dispaly if either the `full` or `with_symlink_targets` options are given

* If the metadata for every item in the size column is None, do not show the size column

* Do not show the symlink target column if the metadata is None for all the items in the table
2020-05-04 14:58:11 +12:00
Joseph T. Lyons
8d69c77989
Display either dir metadata size or dir apparent size in ls (#1696)
* Show dir size in ls command

* Add the option to show the apparent directory size via `ls --du`
2020-05-03 17:09:17 +12:00
chrisr
ada92f41b4
Parse file size (byte) units in all mixes of case (#1693) 2020-05-02 14:14:07 -04:00
Joseph T. Lyons
ef3049f5a1
Reduce some repetitive code in files.rs (#1692) 2020-05-02 11:14:29 -04:00
Darren Schroeder
e9e3fac59d
Remove bin.is_file() because it's expensive (#1689)
This one change takes the startup time from 2.8 seconds to 1.2 seconds in my testing on Windows.
2020-05-01 06:43:59 +12:00
Jonathan Turner
7d403a6cc7
Escape some symbols in external args (#1687)
* Escape some symbols in external args

* Don't escape on Windows, which does its own

* fix warning
2020-04-30 16:54:07 +12:00
Andrés N. Robalino
cf53264438
Table operating commands. (#1686)
* Table operating commands.

* Updated merge test for clarity.

* More clarity.

* Better like this..
2020-04-29 23:18:24 -05:00
Jonathan Turner
d834708be8
Finish remove the last traces of per-item (#1685) 2020-04-30 14:23:40 +12:00
Mohammed Anas
789b28ac8a
Convert if expression to match (#1683) 2020-04-30 12:59:50 +12:00