2
0
Fork 0
mirror of https://github.com/nushell/nushell synced 2025-01-25 19:35:25 +00:00
Commit graph

2810 commits

Author SHA1 Message Date
JT
0bd8664f33
Fix string interpolation escaping () 2022-03-16 05:09:30 +13:00
Reilly Wood
cb5d997adf
Change update help+examples for creating new columns ()
* Change update help/examples for creating new column

* Enable example tests for update command
2022-03-14 15:32:33 -05:00
Justin Ma
10d805c1fa
feat: fix and update some examples () 2022-03-14 07:41:09 -05:00
JT
54d9fff4f2
Revert "Alias to keywords (eg source) ()" ()
This reverts commit c023d4111a.
2022-03-13 13:38:16 -07:00
Jakub Žádník
72daf8c64e
Fix reporting of which and $nu.scope ()
* Refactor & fix which

Instead of fetching all definitions / aliases, only show the one that is
visible.

* Fix $nu.scope to show only visible definitions

* Add missing tests file; Rename one which test
2022-03-13 21:32:46 +02:00
JT
c023d4111a
Alias to keywords (eg source) ()
* Allow aliasing source

* Add test
2022-03-13 11:30:37 -07:00
JT
ff3dffd813
Nu glob ()
* Fork glob. Normalise license holder

* Fix more licenses

* unwraps

* bad doc test
2022-03-13 11:30:27 -07:00
Fernando Herrera
30bb090cd4
str to datetime dfr ()
* str to datetime dfr

* change description
2022-03-13 13:53:13 +00:00
Andrew Barnes
dfffd45bcd
Streaming support for lines with raw streams () 2022-03-13 04:52:55 -07:00
Jakub Žádník
c73d8d5f95
Add LIB_DIRS and PLUGIN_DIRS ()
* Add LIB_DIRS and PLUGIN_DIRS

* Put plugin dirs behind plugin feature
2022-03-12 22:12:15 +02:00
Darren Schroeder
0ff9cc679e
add $nu.pid () 2022-03-12 10:54:59 -06:00
Darren Schroeder
ccc85a2979
remove $nu.cwd () 2022-03-12 09:11:19 -06:00
Fernando Herrera
005301647a
equal comparisson series string () 2022-03-12 13:15:30 +00:00
Jakub Žádník
90b2ec537f
Do not pass non-string env vars to externals ()
* Do not pass non-string env vars to externals

Also misc cleanup

* Add note to default config

* Add a test

* Ensure PATH/Path conversion list <-> string
2022-03-12 00:18:39 +02:00
Justin Ma
f3626f7c3a
Update docs for open and decode command, regenerate all docs ()
* Update docs for open and decode command, regenerate all docs

* Update open.rs

* Update open.md

Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
2022-03-11 05:39:54 -05:00
Justin Ma
ce690ed18f
Bump sysinfo version from v0.22.2 to v0.23.5, close () 2022-03-10 11:38:32 -05:00
JT
2b3843c7c0
ensure exit codes in more cases () 2022-03-10 07:32:46 -05:00
JT
9abb14b5fd
ensure exit codes in more cases () 2022-03-10 06:29:23 -05:00
JT
12bf23faa6
Move completions to DeclId ()
* Move completions to DeclId

* fmt

* fmt
2022-03-10 09:49:02 +02:00
Justin Ma
643cce8a6f
Mark match as deprecated command () 2022-03-09 20:58:42 -06:00
JT
3bdd924349
Fixes the panic when using externs + string interpolation () 2022-03-09 13:01:23 -05:00
JT
be43b3c5fc
Allow passing block literals to do () 2022-03-09 09:56:19 -05:00
JT
355b1d9929
Simplify empty?, improve default ()
* Simplify empty?, improve default

* improve test
2022-03-09 08:46:28 -05:00
Justin Ma
0d82d7df60
Update documents for commands ()
* Update documents of commands

* Change plugin names for register command examples

* Remove unused docs [ci skip]
2022-03-09 08:05:35 -05:00
JT
8fcf51908a
Fix expansion of row condition implied it () 2022-03-09 08:05:03 -05:00
JT
925e9f4dcb
Allow quotes in a register call () 2022-03-09 07:06:44 -05:00
JT
e0fac7bc72
Change select to match 0.44 () 2022-03-09 07:05:55 -05:00
JT
fac086c826
Make reduce -n more sensible () 2022-03-09 05:56:08 -05:00
JT
088d19ad47
Make date values more readable () 2022-03-09 05:43:04 -05:00
JT
2ac990655e
Add support for var decl spans () 2022-03-09 04:42:19 -05:00
Darren Schroeder
b73af3b8df
add ability to check if value does not contain something () 2022-03-08 09:10:01 -06:00
JT
dc0c5a9772
Revert "Make if blocks work like a def-env ()" ()
This reverts commit 477f3be8df.
2022-03-08 08:29:12 -05:00
JT
477f3be8df
Make if blocks work like a def-env ()
* Make `if` work like a def-env

* Add some tests

* Add an example
2022-03-08 07:45:47 -05:00
JT
299fea8538
Fix external extra ()
* Fix empty table from externals

* Fix empty table from externals
2022-03-07 20:17:33 -05:00
Darren Schroeder
35ff1076f3
add ansi escape ()
* add ansi escape

* also add the ability to escape parens

* add a few more escapes that could be problematic for the nushell lang
2022-03-07 16:39:16 -06:00
JT
1837bf775c
Default values () 2022-03-07 15:08:56 -05:00
Genna Wingert
0a95bc7e60
Add serialization for JSON and form bodies in post ()
* Add serialization for JSON and form bodies in `post`

* Reuse code from `to json` instead of duplicating

* Fix formatting. Oops
2022-03-07 10:49:45 -06:00
JT
a2723c2ba4
Fix rest parsing ()
* More nuon tests, fix table print

* Fix rest type parsing
2022-03-07 11:44:27 -05:00
JT
0b6b321ad6
More nuon tests, fix table print () 2022-03-07 08:39:02 -05:00
JT
4f43d75130
Simplify group/window into their own commands () 2022-03-06 20:01:29 -05:00
Michael Angerman
fbbbde1489
Update the Readme for the dataframe directory ()
* update dataframe readme

* update df readme
2022-03-06 11:05:55 -08:00
Fernando Herrera
7701c6b1d4
added real index column to history () 2022-03-06 17:22:18 +00:00
Darren Schroeder
5ae5ef5146
enable to-nu to include the whole dfr if rows is not specified () 2022-03-06 09:04:41 -06:00
Genna Wingert
4aa9a18c63
Allow save to accept a list of strings () 2022-03-05 15:56:04 -06:00
Genna Wingert
1527b34d9c
Add back --append flag to save command () 2022-03-05 13:36:58 -06:00
JT
a4a8f5df54
Add more multiline pipeline forms () 2022-03-05 08:20:13 -05:00
JT
9c17c73d5f
Add more exit code support () 2022-03-04 17:46:18 -05:00
Darren Schroeder
5b3cc73ac6
remove the hard coded escaping from split row and split column () 2022-03-04 15:09:35 -06:00
Darren Schroeder
fbb2e7136c
match is now in the find command () 2022-03-04 11:29:45 -06:00
JT
e64ca97fe2
move scope variable into nu variable () 2022-03-04 11:36:11 -05:00
JT
eef3de2d05
Move old plugins () 2022-03-04 09:36:03 -05:00
Justin Ma
1157fcf372
fix typo, update some examples and regenerate docs () 2022-03-04 06:10:09 -06:00
Genna Wingert
47d5501f9f
Add aliases to command completions () 2022-03-03 15:07:13 -05:00
Genna Wingert
97b3e4a233
Fix aliases to known externals () 2022-03-03 14:05:55 -05:00
Daniel Reilly
52f4c4ba7e
Adds tab indentation option for JSON files. () 2022-03-03 13:15:13 -05:00
JT
7d0531d270
Add support for escape characters, make nuon a JSON superset ()
* WIP

* Finish adding escape support in strings

* Try to fix windows
2022-03-03 13:14:03 -05:00
Genna Wingert
13f2048ffb
Add completion options for custom completions ()
* Add completion options for custom completions

* Make clippy happy

* Refactor options for clarity

* Make return type of filtering explicit
2022-03-03 09:45:35 -05:00
Yutaro Ohno
210d25f2a0
Add into duration ()
* Add `into duration` command

* Avoid using unwrap()

* Use existing logic to parse duration strings
2022-03-03 08:16:04 -05:00
Fernando Herrera
2fd42d25b1
partial completions () 2022-03-03 11:13:44 +02:00
Jakub Žádník
d90b7953dd
Use Nushell's PATH in which ()
* Make which use our path instead of std::env

* Unignore which test

* Fix wrong fn signature without which feature
2022-03-03 10:38:31 +02:00
JT
96a1bf5f8d
Experiment: Allow both $true/true and $false/false ()
* Change true/false to keywords

* oops, clippy

* Both kinds of bools

* Add in some boolean variables

* disable py virtualenv test for now
2022-03-02 19:55:03 -05:00
JT
fd88920a9d
Make sure we have text before json parse () 2022-03-02 15:58:56 -05:00
JT
88d7b50e37
Pass redirects into call ()
* Pass redirects into call

* Oops, format
2022-03-02 07:52:24 -05:00
JT
4965f4cbf4
Bump to 0.59.1 () 2022-03-01 16:55:51 -05:00
Justin Ma
42f1874a3a
Update some examples and docs ()
* Update some examples and docs

* Update now.rs

* Update date_now.md

Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
2022-03-01 08:05:29 -05:00
JT
2a89936bee
Move to latest stable crossterm, with fix () 2022-03-01 07:05:46 -05:00
Fernando Herrera
ece5e7dbb7
dataframe list command () 2022-03-01 06:41:13 -05:00
JT
a6a96b29cb
Add binary literals () 2022-02-28 18:31:53 -05:00
JT
cb5c61d217
Fix open ended ranges ()
* Make open ended ranges more open ended

* Add test
2022-02-28 11:15:31 -05:00
Justin Ma
b09acdb7f9
Fix unsupported type message for some math related commands ()
* Fix unsupported type message of some math related commands

* changing the error form for UnsupportedInput

* cargo fmt
2022-02-28 10:14:33 -05:00
JT
10364c4f22
don't use table compaction in to nuon if not a table ()
* don't use table compaction in to nuon if not a table

* Make a proper nuon conversion test

* more nuon tests
2022-02-28 07:10:02 -05:00
Jonathan Moore
ef70c8dbe4
Date parse refactor ()
* More flexible and DRY datetime parsing

* Update error messages

* cargo fmt

* clippy

* Add DatetimeParseError
2022-02-27 20:21:46 -05:00
Darren Schroeder
796d4920ab
add char separators ()
* add char separators

* sir clipster

* unclippy
2022-02-27 16:03:21 -06:00
JT
7819210037
Add shortcircuiting boolean operators () 2022-02-27 17:02:53 -05:00
Fernando Herrera
4ebbe07d27
Polars upgrade ()
* polars upgrade

* Update describe.rs

Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
2022-02-27 11:10:29 -05:00
Fernando Herrera
995757c055
flags for find () 2022-02-27 06:17:13 -05:00
Stefan Holderbach
799fa98411
Update reedline, revert crossterm ()
At the moment `crossterm` apparently has a regression decoding certain important key combinations on Windows.
Thus reedline reverted to the previous version.

Some changes are necessary to remove the need for `crossterm` in the use of `lscolors`.
Introduces two local conversion traits.

Additionally update the `Highlighter` API to support the cursor
position.
This will enable brace/statement match highlighting.
2022-02-26 11:23:05 -06:00
Fernando Herrera
11bc056576
Find with regex flag ()
* split find functions

* find command with regex

* corrected message

* cargo fmt
2022-02-26 04:19:19 -05:00
Jae-Heon Ji
ed46f0ea17
fix: add missing metadata for ls_colors ()
* feat: add metadata to roll

* chore: apply clippy

* fix: apply clippy

* fix: revert clippy
2022-02-25 17:31:02 -05:00
JT
0c3ea636fb
Add support for stderr and exit code () 2022-02-25 14:51:31 -05:00
JT
977ef66356
Fix Windows doc comments ()
* WIP windows doc comments

* WIP windows doc comments

* WIP windows doc comments

* actual fix this time
2022-02-25 13:03:39 -05:00
Justin Ma
e6570b41ca
Fix some examples and regenerate docs, should fix: () 2022-02-25 08:14:15 -05:00
JT
2126bef052
clean table text before rendering () 2022-02-25 08:13:55 -05:00
JT
e8a6458f0d
finish up with examples () 2022-02-25 05:19:25 -05:00
JT
70009c015d
Use metadata with lists ()
* Windows external exceptions

* Also use metadata with lists
2022-02-25 04:27:50 -05:00
JT
3c62d27c28
Try again with math-like externals ()
* Try again with math-like externals

* clippy 1.59

* clippy 1.59

* clippy 1.59
2022-02-24 14:02:28 -05:00
Justin Ma
2c9d8c4818
fix: , try to fix the source -h not work issue () 2022-02-24 10:32:10 -05:00
JT
308ab91aff
Speed up the parser and nuon parser a bit more () 2022-02-24 07:58:53 -05:00
Justin Ma
c3979ef1cf
Add example for command n,g,p and grid, update date now examples () 2022-02-24 06:17:05 -06:00
Michael Angerman
784382edde
30 web_tables tests are now passing () 2022-02-24 06:58:20 -05:00
Michael Angerman
feb4f5c347
replace ValueStream with ListStream () 2022-02-24 06:57:31 -05:00
Fernando Herrera
21c0f7d738
allow int and float as strings for arguments ()
* allow int and float as strings for arguments

* consume iterator
2022-02-24 05:09:02 +00:00
JT
4b18fdcc6e
Date literals ()
* Date literals

* update deps

* Add date+duration
2022-02-23 21:02:48 -05:00
Michael Angerman
63487941fb
add back in the tests for query_web in the nu_plugin_query ()
* fix first test

* fix 2nd query_web test
2022-02-23 10:43:36 -06:00
JT
676457acd3
Better ls paths ()
* Fix ls paths... again

* Fix ls paths... again

* Always expand paths inside of glob_from

* Expand in ls before we check for directory info
2022-02-23 10:54:47 -05:00
Darren Schroeder
f507613b38
fixed some more tests () 2022-02-22 11:32:29 -05:00
JT
25712760ba
Add support for math-like externals () 2022-02-22 10:55:28 -05:00
Justin Ma
d054a724d1
Add example for enter, shells and view-source, update some docs () 2022-02-22 09:16:56 -06:00
Fernando Herrera
c2bad71123
remove repeated function ()
* remove repeated function

* name in signature
2022-02-22 08:13:38 -05:00
JT
3e8a41fbc9
Speedup unit parse ()
* Compact nuon tables

* Speed up unit parsing a bit
2022-02-22 04:50:49 -05:00
JT
31925c3d40
Compact nuon tables () 2022-02-21 20:48:42 -05:00
JT
9888f8f298
Add pipeline redirection support ()
* redirection

* Remove commented-out

* fix tests

* more fixes
2022-02-21 17:22:21 -05:00
Jakub Žádník
739e403cd5
Do not set visibility to true automatically ()
Adding it by default grows the size of the visibility structure a lot.
2022-02-21 16:42:31 -05:00
Jakub Žádník
359bb6eebe
Look up predecl only in the working set ()
Previously, the parser tried to look up the predecl also in the
permanent state and if a definition with that name already existed, it
would try to update it, which is illegal.
2022-02-21 16:05:20 -05:00
JT
6d4784a7c1
Make 'each' implicitly filter out nothings ()
* Make 'each' implicitly filter out nothings

* another example
2022-02-21 15:49:08 -05:00
Darren Schroeder
88fa40d698
rename flatshape_* to shape_* () 2022-02-21 12:27:21 -06:00
JT
24fc9c657e
Add binary support to 'skip' ()
* Add binary support to 'skip'

* add streaming
2022-02-21 13:23:43 -05:00
JT
6670b77b27
Fix shorthand env duplicates () 2022-02-21 12:58:04 -05:00
Justin Ma
53b5012f1e
feat: update: , Add examples for command: use,module,export def,export env and export def-env () 2022-02-21 09:32:31 -06:00
Jae-Heon Ji
d1ec05b12b
fix: lose ls_colors in some filters commands ()
* feat: add metadata to first

* feat: add metadata to last and skip

* feat: add metadata to reverse

* fix: apply clippy
2022-02-21 08:29:51 -06:00
JT
a2c4c92fce
Remove record iteration ()
* Remove record iteration

* Remove test
2022-02-21 09:12:04 -05:00
Justin Ma
917886f8ad
feat: update: , Add examples for command: hide, history, from yml, def-env, and table () 2022-02-21 07:52:50 -06:00
Joseph T. Lyons
4f367a59de
Strip trailing whitespace in files ()
* Strip trailing whitespace in rs files

* Strip trailing whitespace in toml files

* Strip trailing whitespace in md files

* Strip trailing whitespace in nu files
2022-02-21 08:38:15 -05:00
Justin Ma
968427c4e9
feat: update: , Add example for register,source,save,shuffle and from tsv () 2022-02-21 06:25:41 -06:00
JT
d454fad4dc
Improve json errors a bit ()
* Improve json errors a bit

* typo
2022-02-21 07:08:09 -05:00
JT
a96f8b891e
more strict nuon handling, better nuon errors ()
* more strict nuon handling, better nuon errors

* Improve errors a bit more
2022-02-20 22:31:50 -05:00
Joseph T. Lyons
5bf2ffeaf5
Add indent flag to to json (first draft) ()
* Add indent flag to `to json` (first draft)

* Run cargo fmt

* Update examples / tests

* Change order of examples
2022-02-20 16:29:19 -06:00
Darren Schroeder
9b2a022f5b
tweak default config to amplify theme-ability ()
* tweak default config to amplify theme-ability

* missed default of auto
2022-02-20 16:05:36 -06:00
JT
fd22211737
Add nuon format for fun ()
* Add nuon format for fun

* more fun

* More nuon fixes, allow comments, improve errors
2022-02-20 16:26:41 -05:00
JT
2ba12afb01
A few fixes to docs generation and default config ()
* A few fixes to docs generation and default config

* A few more fixes
2022-02-20 15:20:41 -05:00
JT
6024a17a5b
Remove stray println ()
* Default config improvements

* Finish cleanup

* Add some comments

* remove println
2022-02-20 09:41:16 -05:00
Jakub Žádník
56aacc4852
Use environment variable for env_conversions ()
* Handle string->value env conv. with env. var.

Also adds the environment variable for Path/PATH and removes it from
config.

* Simplify getting the string->value conversion

* Refactor env conversion into its own function

* Use env var for to_string conversion; Remove conf

* Fix indentation in default config
2022-02-20 16:27:59 +02:00
JT
643c5097d6
Default config improvements ()
* Default config improvements

* Finish cleanup

* Add some comments
2022-02-20 07:48:46 -05:00
JT
9ea5a2ecd3
Improve missing param error span () 2022-02-19 21:30:29 -05:00
JT
a32ce93c79
Improve full help for flags () 2022-02-19 21:25:52 -05:00
eggcaker
b92aaf0432
add custom header ability to post command () 2022-02-19 19:27:48 -06:00
Justin Ma
aea4355d04
refactor: change column names from 'Column*' to 'column*' () 2022-02-19 19:26:47 -05:00
Darren Schroeder
7163721571
a few more ansi escape sequences () 2022-02-19 16:47:52 -06:00
Joseph T. Lyons
efd62f917f
Reduce code duplication in to json command () 2022-02-19 14:46:20 -06:00
Justin Ma
ac99ac003a
Add example for cd,transpose,detect columns,split column and split row () 2022-02-19 09:24:48 -06:00
Joseph T. Lyons
3ecf17e7af
Fix ps command to show process name only ()
* Fix `ps` command to show process name only

* Remove `command_only` -  it is no longer being used
2022-02-18 19:48:52 -06:00
Joseph T. Lyons
28b5399fb7
Use join over custom join code () 2022-02-18 19:07:11 -06:00
Justin Ma
3f14b75153
feat: add examples for length,lines,reject,benchmark and drop column () 2022-02-18 19:03:24 -06:00
JT
d53eaac7a1
Improve comparison errors () 2022-02-18 17:11:27 -05:00
JT
f085bd97f6
Add some more builtin var completions () 2022-02-18 14:34:40 -05:00
Jakub Žádník
c893cc1485
Add config to NuCompleter () 2022-02-18 13:54:13 -05:00
Eli Flanagan
e5bf56a7dd
port post ()
This restores a basic version of the `post` command.
Some source types have been omitted from this first take.
I copied from `fetch` and from `post`@0.40.0.
Part of 
2022-02-18 13:53:10 -05:00
JT
06f9047be4
Add an explicit 'print' command () 2022-02-18 13:43:34 -05:00
JT
786e4ab971
Make 'for' implicitly filter out nothings ()
* Make 'for' implicitly filter out nothings

* Fix test
2022-02-18 13:41:41 -05:00
Jakub Žádník
f65955ccc5
Fix wrong FlatShape name of List () 2022-02-18 18:31:28 +02:00
Justin Ma
1235d516a5
Add examples for env,let-env,rm,touch and date list-timezone ()
* feat: update , add examples for env,let-env,rm,touch and date list-timezone

* fix typo

* update example for `date list-timezone` command
2022-02-18 18:19:37 +02:00
Justin Ma
dd11be03be
feat: update , add command examples for def, do, cp, mv, mkdir and ls () 2022-02-18 08:30:16 -06:00
Justin Ma
a5f9ad2a43
Add or update examples for some commands ()
* chore: add or update examples for some commands

* chore: code formatting
2022-02-18 07:06:52 -06:00
Darren Schroeder
1377693f0f
standardize char nf terms () 2022-02-18 05:52:48 -05:00
Jakub Žádník
bccce0ab46
Use overlay ID for module import lookup ()
* Add id to import pattern

* Finish testing importing in a block
2022-02-17 20:58:24 -05:00
Jakub Žádník
c7c427723b
Test support fixes ()
* Fix failing pipeline()

The `skip(1)` was there likely to remove the welcome message.

* Fix typo

* Fix nu! test macro to enter cwd correctly

Nushell's current working directory is determined primarily by the PWD
environment variable.
2022-02-18 00:23:04 +02:00
Darren Schroeder
d4cd3f9578
allow dfr open to open tsv files () 2022-02-17 14:15:17 -06:00
Darren Schroeder
9415352447
remove $nu.keybinding-path () 2022-02-17 14:36:08 -05:00
Genna Wingert
8f5b857fcf
Fix ignore to run side effects of previous command ()
Co-authored-by: Genna Wingert <wingertge@gmail.com>
2022-02-17 12:49:54 -05:00
JT
fa75c93765
Slight cleanup of 'from json' line-at-a-time () 2022-02-17 12:49:31 -05:00
JT
393cb7ca6f
Treat ls for absolute paths as-is ()
* Absolute paths in ls are treated as-in

* Better fix
2022-02-17 12:49:20 -05:00
JT
f5f9d56c37
Move to a standard kebab/snake style () 2022-02-17 09:55:17 -05:00
JT
6e733f49bc
Require block params ()
* Require block params

* Improve errors
2022-02-17 06:40:24 -05:00
Darren Schroeder
b8b2737890
make find case insensitive () 2022-02-16 19:42:40 -06:00
JT
d620f76a21
Make comparisons/sort-by more 'global' ()
* Make comparisons/sort-by more 'global'

* Let custom values do their own comparisons
2022-02-16 13:30:37 -06:00
Darren Schroeder
b64ac9eb7b
more test fixes ()
* more test fixes

* update multi-os err messages
2022-02-16 12:24:45 -06:00
JT
5b6156687e
Use partial_cmp and make -i case insensitive ()
* Use partial_cmp and make -i case insensitive

* Insensitive sort multiple columns
2022-02-16 11:12:49 -05:00
JT
c4e1559f89
Another batch of command tests ()
* Add a batch of command tests

* More tests
2022-02-16 07:38:02 -05:00
JT
644435bfe3
Move and enable with-env test () 2022-02-16 04:59:44 -05:00
Michael Angerman
bd96ce4e9c
add more examples to the sys command () 2022-02-15 21:06:38 -08:00
Darren Schroeder
7e6430def0
a few more tests () 2022-02-15 20:48:32 -05:00
JT
e763a8dcef
Auto-hide aliases to prevent recursion () 2022-02-15 17:36:24 -05:00
JT
df07e8e410
Fix view-source command () 2022-02-15 17:03:06 -05:00
Jonathan Moore
f824388f63
Date format list ()
* Add `date format --list`, and make format string optional (providing default)

* Make DRY

`into datetime --list` now uses `generate_strfttime_list` from `date format --list`

* refactor strftime to use current datetime

* Fix formatting of specification descriptions

Fixes issues caused when copying directly from docs.rs

* Change default format to rfc2822

Perhaps to make it more DRY, functions from `into datetime` can be used. However, currently `into datetime` is a bit tricky to use as it needs a separate time zone argument.

* Tweak in-shell docs to match modified behavior

* Show %#z format specifier in `into datetime --list` only

* cargo fmt

* Satisfy clippy
2022-02-15 15:13:40 -06:00
Darren Schroeder
f11fa99d30
check to make sure we have data first () 2022-02-15 15:08:11 -06:00
JT
56b3fc61a3
Remove statements, replaced by pipelines () 2022-02-15 14:31:14 -05:00
JT
66669d7839
Fix more command tests () 2022-02-15 10:08:07 -05:00
JT
5c1a1be02b
Don't error on failed external expansion () 2022-02-15 08:47:25 -05:00
JT
9114a2d31d
Ensure that reduce has a valid span () 2022-02-15 07:59:51 -05:00
JT
84f85ff9ae
Fix to json escape logic () 2022-02-15 06:55:57 -05:00
JT
a743db8e8f
Improve alias expansion, again () 2022-02-14 21:09:21 -05:00
JT
fbaafaa459
Make param parsing more resilient, correct missing param error () 2022-02-14 12:33:47 -05:00
Michael Angerman
63a2c2bc2d
remove ignore for sort_by command test by_column which is now passing () 2022-02-13 20:46:12 -08:00
JT
8c0a2d3c15
Auto-generate markdown command docs ()
* Finish updating

* a couple improvements

* Update renames

* cleanup examples
2022-02-13 21:22:51 -05:00
Michael Angerman
06f5affc0b
add in the Value List to the sort-by Ordering () 2022-02-13 10:20:50 -08:00
Michael Angerman
7a3aeaf080
sort_by: coerce_compare now returns an Ordering ()
* coerce_compare now returns an Ordering which will enable mixed type comparison

* arbitrary nushell sort order of Float / Int / String / Bool
2022-02-13 09:23:54 -08:00
Justin Ma
a520599fa0
fix: fix with-env example with pipeline input () 2022-02-13 06:40:01 -06:00
Andrew Barnes
77eb4c4188
Fix default duplicates column ()
* Add test to ensure default not adding dup. columns

* Fix for default adding duplicate columns
2022-02-13 05:38:46 -05:00
Michael Angerman
e82ffc4dee
sort_by error processing return ShellError instead of static String ()
* sort_by error processing part I return ShellError instead of static Strings

* more explicit details on what types are failing

* clippy fixes
2022-02-12 21:30:57 -08:00
Darren Schroeder
6fc082f6e9
fix case insensitive sort ()
* fix case insensitive search

* fixed test

* tweak
2022-02-12 20:48:50 -06:00
Justin Ma
560be6e73e
feat: mark str to-datetime as deprecated command () 2022-02-12 20:30:37 -06:00
Robert O'Shea
c5e7bccee5
Fixed printing of builtin kill command ()
* Fixed printing of builtin kill command

* Fixed fmt and clippy issues for kill command

* Uncommented unintentional comments

* Fixed wrong code added in kill command

* Fixed more fmt issues with kill command
2022-02-12 20:18:27 -06:00
Jakub Žádník
94a0e3060a
Update CI ()
* Add different features combinations

* Specify styles manually

* Fix args

* Fix typo

* Let other CI jobs finish if one fails

* Fix unused symbols without plugin feature

* Put "which" tests behind "which" feature

* Add Python virtualenv job

* Oops forgot git command

* Install Nushell in virtualenv tests

* Add names to steps; Test v.env in separate step

* cd into virtualenv

* Do not run on Python 2.7

* Build Nushell after formatting and clippy checks
2022-02-12 22:48:17 +02:00
JT
eceb2d5106
Early return on subcommands ()
* Early return on subcommands

* More streamlining
2022-02-12 11:39:38 -05:00
Justin Ma
baf6348e66
feat: add unalias to deprecated command () 2022-02-12 17:06:52 +02:00
JT
cc171b6ad4
Improve completions with no starting characters ()
* Improve completions with no starting characters

* Fix subexpressions, crashes, and differentiate externals
2022-02-12 10:04:10 -05:00
Fernando Herrera
1fd7b9ac38
roll commands ()
* roll commands

* removed repeated funtion
2022-02-12 06:11:54 -05:00
Darren Schroeder
b4b7524206
changed example description () 2022-02-12 06:10:41 -05:00
Jakub Žádník
328f7e92a0
Hide alias ()
* Add alias interning

Now, AliasId is used to reference aliases stored in EngineState, similar
to decls, blocks, etc.

* Fix wrong message

* Fix using decl instead of alias

* Extend also alias id visibility

* Merge also aliases from delta

* Add alias hiding code

Does not work yet but passes tests at least.

* Fix wrong alias lookup and visibility appending

* Add hide alias tests

* Fmt & Clippy

* Fix random clippy warnings in "which" command
2022-02-12 11:50:37 +02:00
Fernando Herrera
fcc13224c1
headers command ()
* headers command

* correct behaviour headers
2022-02-11 21:06:49 -05:00
Robert O'Shea
926177235c
Added quiet flag rm command ()
* rm now uses -f flag to not print anything

* changed quiet flag to q not f

* Changed value passed to Value::Nothing in rm command
2022-02-12 01:22:40 +02:00
Genna Wingert
85d1a681c7
Remove stringification for binary values in save command ()
* Remove stringification for binary values in `save`

* Fix typo and clippy warning
2022-02-11 14:26:36 -05:00
JT
a16e485cce
Add support for defining known externals with their own custom completions ()
* WIP for known externals

* Now completions can work from scripts

* Add support for definiing externs

* finish cleaning up old proof-of-concept
2022-02-11 13:38:10 -05:00
JT
a767fa369c
Improve quote path completions with drill-down () 2022-02-11 09:42:15 -05:00
JT
886ed5ab2d
Fix captures ()
* Fix rowcondition and import captures

* Only check extra blocks if not yet seen
2022-02-11 07:37:10 -05:00
JT
e16d6ae00c
Improve external command completions with spaces () 2022-02-11 07:05:48 -05:00
Darren Schroeder
ba4d8ae8c3
tweak wording () 2022-02-10 17:27:51 -06:00
JT
e6db37bc82
Fix multi-command variable captures () 2022-02-10 18:15:15 -05:00
JT
2e3b2a48ee
Fix string interpolation paren cases () 2022-02-10 11:09:08 -05:00
Fernando Herrera
5cf91cb30d
deprecated commands ()
* deprecated commands

* deprecated insert command
2022-02-10 12:55:19 +00:00
Darren Schroeder
28947ff9a9
fix broken -w param for grid () 2022-02-10 07:29:53 -05:00
JT
c2118e7505
Fix help flag ()
* Match 'help command' to 'command --help'

* Fix tests
2022-02-09 21:24:29 -05:00
Stefan Holderbach
e1f98c1bfd
Fix trash-support feature flag ()
Pass it through to be inclued with `--all-features`

Make clippy without `--all-features` happy
2022-02-09 18:20:46 -05:00
Genna Wingert
12d4c2986c
Fix docs for kill command in engine-q () 2022-02-09 18:20:20 -05:00
Darren Schroeder
f275644e13
add --perf cli param ()
* add `--perf` cli param

* clippy

* fixed 2 `cp` tests on windows
2022-02-09 16:08:16 -06:00
JT
fc88a8538b
Make let-env work like let ()
* Make let-env work like let

* Fix tests
2022-02-09 13:41:41 -05:00
JT
5a1d81221f
Move 'nth' into 'select' () 2022-02-09 09:59:40 -05:00
JT
43850bf20e
Re-port filesystem commands ()
* Re-port the filesystem commands

* Remove commented out section
2022-02-09 09:56:27 -05:00
Ray Henry
94ab981235
Fix "Index out of bounds" when input to the group-by filter is empty. ()
* Fix "index out of bounds" when input to group-by is empty 

* Fix formatting 

* Adds test for empty input

Co-authored-by: Ray Henry <ray.henry@thermofisher.com>
2022-02-09 08:47:47 -06:00
JT
f9e1c4ef50
Use 'table' on scripts and -c commands ()
* Use 'table' on scripts and -c commands

* Fix tests

* Oops, missed a spot
2022-02-09 05:58:54 -05:00
Stefan Holderbach
659da3c4a4
Make ANSI stripping lazy in more places ()
Same rationale as in 

Also accelerate `grid`

before:

```
Command being timed: "./eager_nu -c for i in 0..100000 { echo whatever } | grid"
        User time (seconds): 0.21
        System time (seconds): 0.05
        Percent of CPU this job got: 36%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.71
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 48112
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 0
        Minor (reclaiming a frame) page faults: 10580
        Voluntary context switches: 266
        Involuntary context switches: 2595
        Swaps: 0
        File system inputs: 0
        File system outputs: 0
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0
```

after:

```
Command being timed: "./lazy_nu -c for i in 0..100000 { echo whatever } | grid"
        User time (seconds): 0.14
        System time (seconds): 0.05
        Percent of CPU this job got: 33%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.60
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 48272
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 1
        Minor (reclaiming a frame) page faults: 10582
        Voluntary context switches: 286
        Involuntary context switches: 831
        Swaps: 0
        File system inputs: 56
        File system outputs: 0
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0
```
2022-02-08 18:25:31 -06:00
Stefan Holderbach
9c7feb2b19
Reduce table allocs: only strip ANSI if necessary ()
For the width calculations for table layout the `strip_ansi` function
has to be called frequently. By checking for the ASCII control chars
(0x00 to 0x1f) except `\n` that are stripped by `strip_ansi_escapes` the number of
necessary allocations can be reduced significantly for the simple case
of text not containing ANSI escapes.

**Benchmark:**

```
nu -c "for i in 0..1000 { ls } | flatten | table"
```

**Allocation reduction**

Running on the nushell repo root as the directory, this change reduces the
allocation volume by approximately 400 MB

(Measured run via KDE heaptrack)
**Speed improvement to output**

Measured via `/usr/bin/time -v`

*before*

```
Command being timed: "./eager_nu -c for i in 0..1000 {ls} | flatten | table"
	User time (seconds): 0.87
	System time (seconds): 0.14
	Percent of CPU this job got: 87%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 0:01.16
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 18888
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 0
	Minor (reclaiming a frame) page faults: 4809
	Voluntary context switches: 38
	Involuntary context switches: 14
	Swaps: 0
	File system inputs: 0
	File system outputs: 0
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0
```

*after*

```
Command being timed: "./lazy_nu -c for i in 0..1000 {ls} | flatten | table"
	User time (seconds): 0.63
	System time (seconds): 0.14
	Percent of CPU this job got: 80%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.97
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 18660
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 0
	Minor (reclaiming a frame) page faults: 5149
	Voluntary context switches: 24
	Involuntary context switches: 5
	Swaps: 0
	File system inputs: 0
	File system outputs: 0
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0
```
2022-02-08 17:43:32 -06:00
panicbit
cf20eed7bc
Support records in reject command ()
* support records in reject command

* add reject command tests
2022-02-08 15:57:46 -05:00
Darren Schroeder
baceb54660
update ls_colors defaults () 2022-02-08 11:13:04 -06:00
JT
19caef260d
Fix 'enter' to expand path before checking for it () 2022-02-08 11:21:17 -05:00
JT
d70d91e559 Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
Fernando Herrera
fdce6c49ab engine-q merge 2022-02-07 19:11:34 +00:00
Onur Şahin
265ee1281d
Drop with iter range ()
* Allow range in 'drop nth'

* Unit tests for drop nth range

* Add range case to the description

* Fix description 2

* format fixes

* Fix example and some refactoring

* clippy fixes
2022-02-07 08:02:35 -05:00
JT
a78c82d811
Make PipelineData helpers collect rawstreams () 2022-02-07 07:44:18 -05:00
JT
84d3620d9b
Oops, match semantics of each group/window () 2022-02-06 21:26:01 -05:00
JT
8a373dd554
Add each window () 2022-02-06 20:23:18 -05:00
JT
c3e0e8eb5c
Add par-each group () 2022-02-06 19:28:09 -05:00
JT
de4449c3ee
Fix completion duplicates () 2022-02-06 16:33:33 -05:00
JT
a911b21256
Switch more commands to redirecting blocks () 2022-02-05 21:03:06 -05:00
Darren Schroeder
2dd32c2b88
Rename some files ()
* renamed some files

* clippy

* update tests
2022-02-05 12:35:02 -05:00
JT
3eba90232a
Port each group () 2022-02-05 12:34:35 -05:00
JT
c4858fb202
Remove broken error make examples () 2022-02-05 12:01:08 -05:00
JT
8a93548de2
Error make ()
* Add `error make` and improve `metadata`

* Allow metadata to work on just a pipeline
2022-02-05 09:39:51 -05:00
Michael Angerman
e45e8109aa
fix test math/avg.rs can_average_bytes () 2022-02-05 07:01:10 -05:00
Darren Schroeder
709927cee4
Sort keystuff ()
* sort things

* reorg
2022-02-04 17:20:54 -06:00
Fernando Herrera
abaeffab91
default keybindings command () 2022-02-04 17:20:40 -06:00
Michael Angerman
73dcec8ea1
fix some of the sort_by tests several more left to do () 2022-02-04 13:51:49 -08:00
Darren Schroeder
b26acf97bd
a few more tests () 2022-02-04 15:42:18 -06:00
JT
f29dbeddd7
Allow let-env to be dynamic () 2022-02-04 16:19:13 -05:00
Darren Schroeder
8204cc4f28
fix ls and ls tests ()
* fix `ls` and ls tests

* tweak to ls so it doesn't scream on empty dirs

* clippy

* reworked `ls` to put in what was left out
2022-02-04 14:32:13 -06:00
Michael Angerman
c2f6dfa75c
add nth tests to mod.rs () 2022-02-04 12:08:25 -08:00
JT
90f6b6aedf
Simplify describe () 2022-02-04 14:51:36 -05:00
Darren Schroeder
ece1e43238
fix into filesize tests and filesize ()
* fix into filesize tests and filesize

* tweaks

* added span back for like the 10th time

* Update filesize.rs

Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
2022-02-04 13:26:08 -06:00
Jakub Žádník
fefd5fef12
Allow def-env to hide environment variables () 2022-02-04 20:02:03 +02:00
Darren Schroeder
dd2d601471
fix lines tests () 2022-02-04 11:34:01 -06:00
Darren Schroeder
c6dad0d5eb
fix find tests () 2022-02-04 10:47:24 -06:00
JT
522a53af68
Add support for quick completions () 2022-02-04 10:30:21 -05:00
JT
1a246d141e
Improve subcommand completions () 2022-02-04 08:38:23 -05:00
Darren Schroeder
b86c6db400
fix cal tests ()
* fix 1 test

* missed 1 test
2022-02-04 07:24:36 -06:00
Fernando Herrera
1e86af2fb9
list keybinding options ()
* list keybinding optins

* list keybinding options

* clippy error
2022-02-04 06:47:18 +00:00
JT
a008f1aa80
Command tests ()
* WIP command tests

* Finish marking todo tests

* update

* update

* Windows cd test ignoring
2022-02-03 21:01:45 -05:00
Darren Schroeder
3d3298290a
add case-insensitive sorting () 2022-02-03 15:18:18 -06:00
Darren Schroeder
e1c28cf06b
add --du to ls command () 2022-02-03 13:58:32 -06:00
Darren Schroeder
2f0bbf5adb
du command ()
* wip on `du` command

* working
2022-02-03 11:35:06 -06:00
JT
cc1b784e3d
Add initial nu-test-support port ()
* Add initial nu-test-support port

* finish changing binary name

* Oops, these aren't Windows-safe tests
2022-02-02 15:59:01 -05:00
Darren Schroeder
cbdc0e2010
Windows ps update ()
* query command with json, web, xml

* query xml now working

* clippy

* comment out web tests

* Initial work on query web

For now we can query everything except tables

* Support for querying tables

Now we can query multiple tables just like before, now the only thing
missing is the test coverage

* Revert "Query plugin"

* augment `ps -l` on windows to display more info

Co-authored-by: Luccas Mateus de Medeiros Gomes <luccasmmg@gmail.com>
2022-02-01 15:05:26 -06:00
Darren Schroeder
004d7b5ff0
query command with json, web, xml ()
* query command with json, web, xml

* query xml now working

* clippy

* comment out web tests

* Initial work on query web

For now we can query everything except tables

* Support for querying tables

Now we can query multiple tables just like before, now the only thing
missing is the test coverage

* finish off

* comment out web test

Co-authored-by: Luccas Mateus de Medeiros Gomes <luccasmmg@gmail.com>
2022-02-01 12:45:48 -06:00
Darren Schroeder
c80a15cdfe
should be inclusive ()
* should be inclusive

* changed tests due to spans being different
2022-01-31 17:02:36 -06:00
JT
4c9df9c7c1
Add a fallback if Windows external spawn fails ()
* Add a fallback if Windows external spawn fails

* Remove path workaround

* More fixes

* More fixes

* Be more flexible with error tests
2022-01-31 12:42:12 -05:00
JT
96fedb47ee
Wait on the plugin child to prevent zombies () 2022-01-31 10:20:11 -05:00
Ashish Thapa
b1aa8f4edf
Add strftime cheatsheet for into datetime () ()
* Add strftime cheatsheet for `into datetime` ()

* proper table for strftime cheatsheet of `into datetime` ()
2022-01-31 07:32:35 -06:00
JT
d62716c83e
Use 'table' during internal->external ()
* Use 'table' during internal->external

* Preserve more of config
2022-01-31 07:52:05 -05:00
Andrés N. Robalino
def5869c1c
command(split-by) () 2022-01-30 18:29:21 -05:00
Jakub Žádník
2fbd182993
Allow viewing the source code of blocks ()
* Add spans to blocks and view command

* Better description; Cleanup

* Rename "view" command to "view-source"
2022-01-31 00:05:25 +02:00
Julian Aichholz
67cb720f24
Port update cells command ()
* Port update cells command

Clean up, nicer match statements in UpdateCellsIterator

Return columns flag into HashSet errors

Add FIXME: for update cell behavior on nested lists

* Fix: process cells for Record when no columns are specified

* Fix: address clippy lints for unwrap and into_iter

* Fix: don't step into lists and don't bind $it var
2022-01-30 23:41:05 +02:00
JT
a51d45b99d
Ignore clippy's erroneous warnings () 2022-01-30 16:12:41 -05:00
Access
1fd0ddb52c
Maybe solve the none bug? ()
* Maybe solve the none bug?

* cargo fmt

* use nothing, not string

* check at last

* I check it at last

* Use error which has span

* use not found error

* fix error

* use a empty value length?

* * Add commit about what I change and fmt

Now all test passed, but I do not know if it is right

* update the test

* check if it is nothing

* update commit

* Rename test

Co-authored-by: Jakub Žádník <kubouch@gmail.com>
2022-01-30 15:23:28 +02:00
JT
060a4b3f48
Port detect columns () 2022-01-30 07:52:24 -05:00
Michael Angerman
95a5e9229a
add help --find to help doc () 2022-01-30 05:54:15 -05:00
Stefan Stanciulescu
3c8716873e
Port rotate ()
* Add rotate command

* Add rotate counter clockwise

* Fix comments in the code

* Fix clippy warnings

* Fix comment

* Fix wrong step for non even table sizes

* Fix comment for moving through array

* Refactor rotate and have only one command with a --ccw flag for counter-clockwise rotation. By default, rotate is clockwise

* Update usage description
2022-01-29 15:47:28 -05:00
JT
44821d9941
Add support for def-env and export def-env () 2022-01-29 15:45:46 -05:00
Darren Schroeder
dc6f1c496b
fixes process path being truncated () 2022-01-29 08:50:48 -06:00
JT
65ae3160ca
Variables should error on use rather than value span () 2022-01-29 08:00:48 -05:00
Stefan Stanciulescu
1a25970645
Port rename ()
* Port rename

* Update description

* Fix fmt issues

* Refactor the code a bit and move things around
2022-01-29 05:26:47 -05:00
JT
e91d8655c6
Only trim prompt ()
* Only trim the output for prompts

* Only remove the last newline
2022-01-28 18:22:09 -05:00
JT
4c029d2545
Automatically trim ends of stdin/stdout strings () 2022-01-28 16:59:00 -05:00
JT
86eeb4a5e7
Fix a bad slice into erroring utf-8 buffer () 2022-01-28 15:32:46 -05:00
JT
020ad24b25
"maybe text codec" version 2 ()
* Add a RawStream that can be binary or string

* Finish up updating the into's
2022-01-28 13:32:33 -05:00
JT
e11ac9f6f8
Harden highlighter against alias spans () 2022-01-28 07:29:45 -05:00
eggcaker
9926561dd7
Fix into datetime example parameter type () 2022-01-28 00:06:07 +11:00
Fernando Herrera
267ff4b0cf
using menu trait () 2022-01-27 07:53:23 +00:00
JT
04395ee05c
Allow equals to sep long flag and arg () 2022-01-27 12:20:12 +11:00
JT
6f4b7efd3e
Also set $in-variable with input ()
* Also set in-variable with input

* Fix test

* Add more tests
2022-01-27 10:46:13 +11:00
Michael Angerman
a4421434d9
add support for Floats for sort-by () 2022-01-26 14:44:37 -08:00
Stefan Stanciulescu
e8b8836977
Add suport for Filesize and Date for sort-by command () 2022-01-26 13:54:31 -08:00
JT
78b5da8255
Allow let/let-env to see custom command input () 2022-01-27 06:00:25 +11:00
JT
83ec374995
Add -c flag and others to cmdline args ()
* Add -c flag and others to cmdline args

* finish a little bit of cleanup

* Oops, forgot file
2022-01-26 12:26:43 -05:00
JT
8ee619954d
Start support for commandline args to nu itself ()
* cmdline args wip

* WIP

* redirect working

* Add help and examples

* Only show flags in signature of more than help
2022-01-27 01:42:39 +11:00
JT
cdc8e67d61
Remove unused repo parts ()
* Remove unused repo parts

* Update README

* cargo fmt
2022-01-26 07:31:04 +11:00
JT
285f65ba34
Port exec command ()
* Port exec command

* fix windows

* lint
2022-01-26 04:27:35 +11:00
JT
3023af66fd
Port default command () 2022-01-26 02:02:15 +11:00
JT
1ca3e03578
Fix expanding external args () 2022-01-26 00:11:35 +11:00
Stefan Stanciulescu
f4c0538653
Flatten records. Not thoroughly tested though () 2022-01-25 23:07:37 +11:00
Fernando Herrera
69954a362d
history-menu () 2022-01-25 09:39:22 +00:00
eggcaker
5c749fcc63
allow fetch command to add custom headers () 2022-01-25 13:19:29 +11:00
JT
6e44012a2f
Fix bug in date comparison () 2022-01-24 16:55:45 -05:00
JT
988a873466
Allow open to read its filename from input ()
* Allow `open` to read its filename from input

* Add examples
2022-01-25 08:04:28 +11:00
Jakub Žádník
53f41c1985
Port move ()
* Remove comment

* Fix merge not retaining LS_COLORS

* Add move command

* Add checking for non-existent columns

* Add move command examples; Disallow flag shorthand
2022-01-24 21:43:38 +02:00
JT
62e9698b11
Allow external args to expand globs ()
* Allow external args to expand globs

* WIP

* A bit of cleanups and refactor to glob_from

* oops, add file
2022-01-25 05:26:56 +11:00
JT
3d0b1ef1ce
Highlight help tutor ()
* WIP

* Syntax highlight help, add tutor
2022-01-25 02:05:19 +11:00
JT
525ed7653f
Add var vals and alias expansions to scope var ()
* Add var vals and alias expansions to scope var

* Fix test
2022-01-25 01:19:38 +11:00
Michael Angerman
8a1b2d0812
fix several cases where sort-by was crashing engine-q () 2022-01-23 20:52:19 -08:00
Darren Schroeder
d4fb95a98c
allow find to respect ls_colors () 2022-01-24 12:23:03 +11:00
Arthur Targaryen
f82e2fbac6
Port find command ()
* Add `Find` command

* Complete rustdoc for test `Value` constructors

* Use `Option::unwrap_or` instead of match

* Add `Value::test_filesize` constructor

* Handle searching for terms in `find`

* Fix `find` command signature

* Return multiple elements when `find`ing by predicate

* Do not accept rest parameter with predicate

* Handle `CellPath` in `r#in` and `not_in` for `Find`

* Use `PipelineData::filter`
2022-01-23 16:32:02 -06:00
Darren Schroeder
e11a030780
capture keyboard event ()
* capture keyboard event

* try a different strategy - still not working right

* fixed up
2022-01-23 16:09:39 -06:00
Stefan Stanciulescu
4e171203cc
Fix cd-ing into a file ()
* Add custom error for path not being a directory

* Fix cd issue with cd-ing into a file

* Keep formatting style as before

* Check if path is not a directory and return error if that's the case
2022-01-23 15:02:12 +02:00
Maxim Zhiburt
fd3eec81b5
Bump ansi-cut version to 0.2.0 ()
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
2022-01-22 18:36:40 -05:00
Darren Schroeder
3d40e169ce
fix to retain ls_colors coloring from ls ()
fixes 
2022-01-22 18:36:27 -05:00
JT
bf9340ec48
Only escape backslash on windows () 2022-01-22 18:35:52 -05:00
JT
310ecb79b6
Add flag completions () 2022-01-22 16:18:31 -05:00
Michael Angerman
89d852f76c
port sort_by without float (yet) () 2022-01-22 12:49:50 -08:00
JT
af52def93c
Fix doc comments for custom commands () 2022-01-22 13:24:47 -05:00
Darren Schroeder
6a446f708d
add hash base64 () 2022-01-22 10:23:55 -06:00
Stefan Stanciulescu
afe83104c6
Fix flatten's dropping column issue ()
* Fix flatten's dropping column issue, and do some cleanup - better variable naming.

* Fix failing test

* Fix failing tests
2022-01-23 01:19:40 +11:00
JT
b58aad5eb0
Make external app error uniform () 2022-01-23 01:12:34 +11:00
Jakub Žádník
564c2dd7d1
Port merge command from Nushell ()
* Add example test to zip

* Port merge command from Nushell

On top of the original merge, this one should not collect a stream
returned from the merged block and allows merging records.
2022-01-22 01:50:26 +02:00
Eli Flanagan
e1272f3b73
lint: remove trailing whitespace () 2022-01-22 10:29:10 +11:00
JT
6fa022b0a8 Add group-by and transpose (aka pivot) () 2022-01-21 15:28:21 -05:00
Darren Schroeder
0ef0277882
allow use to parse quoted paths () 2022-01-21 13:20:13 -06:00
JT
939745ad67
Support recursive functions in capture () 2022-01-21 11:39:55 -05:00
Fernando Herrera
846a048bba
menu-performance () 2022-01-21 08:59:29 +00:00
Darren Schroeder
057bfff0cb
add term size command ()
* add `term-size` command

* Update term_size.rs

Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
2022-01-21 14:31:33 +11:00
JT
91883bd572
Better help search () 2022-01-20 18:58:58 -05:00
JT
b4e61a056c
add cd - support () 2022-01-21 07:51:44 +11:00
Darren Schroeder
65ef7b630b
PATH for completions for each os () 2022-01-20 13:46:52 -05:00
JT
45b3592739
add some more division for units () 2022-01-21 05:23:26 +11:00
JT
33ffb2c39a
Add which command, add external completions, and builtin var completions ()
* Add which and external completions

* WIP

* Finish up external and var completions

* fix windows
2022-01-21 05:02:53 +11:00
Michael Angerman
d4b6b4b09a
update all cargo crates to edition 2021 () 2022-01-21 00:13:45 +11:00
JT
be8c905ca7
Show error on bad config, but keep going () 2022-01-20 03:42:12 +11:00
JT
d2d22815fb
Improve env shorthand parse () 2022-01-20 01:58:12 +11:00
Fernando Herrera
6514a30b5d
general keybindings ()
* general keybindings

* get value function

* check error for keybinding

* cmd and send for keybingins

* better error message
2022-01-19 07:28:08 -06:00
Fernando Herrera
ff9d88887b
simple event keybinding () 2022-01-18 19:32:45 +00:00
JT
49e8af8ea5
Bump to 0.43 () 2022-01-18 12:06:12 -05:00
JT
d5d61d14b3
Tutor eq ()
* Fix clippy lints

* Fix clippy lints

* Fix clippy lints

* Add e-q tutor page
2022-01-19 03:22:23 +11:00
JT
f562a4526c
Fix clippy lints ()
* Fix clippy lints

* Fix clippy lints

* Fix clippy lints
2022-01-18 23:33:28 +11:00
Guillaume Gomez
e6c09f2dfc
Update sysinfo version () 2022-01-18 22:37:52 +11:00
Fernando Herrera
20eb348896
simple keybinding parsing () 2022-01-18 08:48:28 +00:00
Darren Schroeder
2c75aabbfc
allow size and other to count bytes from binary with as_string() () 2022-01-17 17:41:59 -06:00
Stefan Holderbach
01e691c5ba
Fix unicode word wrapping with ansi-cut ()
Ansi-cut expects ranges of character numbers (of the non-ansi control
sequence characters) instead of byte indices.
This fixes the panics when wrapping of non-unicode lines (which exceed
the demanded number of characters as byte indices).
Also rectifies some wrong wrapping of unicdoe containing lines that
don't panic
2022-01-17 15:31:21 -05:00
Darren Schroeder
085a7c18cb
fix signature () 2022-01-17 09:14:33 -06:00
JT
0f85646d8e
Let 'to toml' output block source () 2022-01-17 19:25:12 +11:00
Darren Schroeder
c55b6c5ed5
fix list formatting () 2022-01-16 16:40:40 -06:00
JT
283a615ecc
Enter now requires a directory () 2022-01-17 03:14:34 +11:00
JT
9b128b7a03
Add rest to get, bump reedline () 2022-01-17 02:40:11 +11:00
Jakub Žádník
bfe3c50dce
Fix empty entry in ls () 2022-01-17 02:40:00 +11:00
Onur Şahin
5fae96a6b1
Fix not equal returning error when same things are compared in some cases ()
* Fix not equal returning error when same things are compared in some cases

* Equality operators supports all type combinations
2022-01-17 01:34:20 +11:00
Jakub Žádník
3b4baa31b6
Fix ls relative path & command argument path expansion ()
* Switch to short-names when the path is a relative_path (a dir) and exit with an error if the path does not exist

* Remove debugging print line

* Show relative filenames... It does not work yet for ls ../

* Try something else to fix relative paths... it works, but the ../ code part is not very pretty

* Add canonicalize check and remove code clones

* Fix the canonicalize_with issue pointed out by kubouch. Not sure the prefix_str is what kubouch suggested

* Fix the canonicalize_with issue pointed out by kubouch. Not sure the prefix_str is what kubouch suggested

* Add single-dot expansion to nu-path

* Move value path expansion from parser to eval

Fixes 

* Remove single dot expansion from parser

It is not necessary since it will get expanded anyway in the eval.

* Fix ls to display globs with relative paths

* Use pathdiff crate to get relative paths for ls

Co-authored-by: Stefan Stanciulescu <contact@stefanstanciulescu.com>
2022-01-17 00:55:56 +11:00
nibon7
746641edae
Port seq command ()
Signed-off-by: nibon7 <nibon7@163.com>
2022-01-17 00:52:41 +11:00
JT
fa5aab8170
Add simple stdin input command ()
* Add simple stdin input command

* Add binary input

* Tweak binary view
2022-01-16 15:28:28 +11:00
JT
b78924c777
Add support for load-env () 2022-01-15 18:50:11 -05:00
JT
75db4a75bc
Save ()
* Add support for save

* Add support for binary filetypes
2022-01-16 07:44:20 +11:00
JT
8f4ee14d85
Hide Windows ps status, bump reedline () 2022-01-16 06:44:24 +11:00
Fernando Herrera
89d99db94f
menu options () 2022-01-15 17:01:44 +00:00
JT
f9c0d223c1
Improve keyword parsing, including for ()
* Improve keyword parsing, including for

* touchup
2022-01-16 02:26:52 +11:00
Jakub Žádník
21a7278259
Revert "Fix ls relative path and erroring on fake dir ()" ()
This reverts commit bee5ba3deb.
2022-01-15 12:58:24 +02:00