Commit Graph

1022 Commits

Author SHA1 Message Date
f61144006f config test harness. 2019-09-10 05:08:01 -05:00
4d3e7efe25 Close a bunch of holes in external command args
Previously, there was a single parsing rule for "bare words" that
applied to both internal and external commands.

This meant that, because `cargo +nightly` needed to work, we needed to
add `+` as a valid character in bare words.

The number of characters continued to grow, and the situation was
becoming untenable. The current strategy would eventually eat up all
syntax and make it impossible to add syntax like `@foo` to internal
commands.

This patch significantly restricts bare words and introduces a new token
type (`ExternalWord`). An `ExternalWord` expands to an error in the
internal syntax, but expands to a bare word in the external syntax.

`ExternalWords` are highlighted in grey in the shell.
2019-09-09 10:43:10 -07:00
aea11cf742 Merge branch 'master' into light_tables 2019-09-10 05:11:11 +12:00
d1167151fc Add support for light tables 2019-09-10 05:10:52 +12:00
1d3483b590 Add a test 2019-09-09 13:39:43 +02:00
1277bfe0fb Fix setting configuration params
Fixes #627

Fixes a regression caused by #579, specifically commit cc8872b4ee .

The code was intended to perform a comparison between the wanted
output type and "Tagged<Value>" in order to be able to provide a
special-cased path for Tagged<Value>. When I wrote the code, I
used "name" as a variable name and only later realized that it
shadowed the "name" param to the function, so I renamed it to
type_name, but forgot to change the comparison.
This broke the special-casing, as the name param only contains
the name of the struct without generics (like "Tagged"), while
`std::any::type_name` (in the current implementation) contains
the full paths of the struct including all generic params
(like "nu::object::meta::Tagged<nu::object::base::Value>").
2019-09-09 13:22:18 +02:00
cf2c19706e fix build warnings & add CI 2019-09-09 06:03:01 -04:00
f770409a60 cd '-' valueshell implementation and valueshell refactorings. 2019-09-08 05:40:47 -05:00
77c2e4200e Filesystem cd refactor/cleanup. 2019-09-08 04:55:49 -05:00
448b1a4848 Make some plugins optional, move ps to plugin 2019-09-08 19:06:15 +12:00
eecda3ecba Merge pull request #363 from twe4ked/cd-back
Implement `cd -` to return to the previous directory
2019-09-08 01:00:32 -05:00
159cf27e39 Implement cd - to return to the last path for the FilesystemShell 2019-09-08 15:10:46 +10:00
07151b8360 Merge pull request #615 from jonathandturner/echo
Fix exec::shell and add echo command
2019-09-08 14:30:24 +12:00
9da896ad4e Attempt so simplify classified 2019-09-08 14:00:04 +12:00
84628f298d Finish fixing failing tests. 2019-09-08 13:35:02 +12:00
4cdaed1ad4 Add echo command 2019-09-08 11:43:53 +12:00
7427ea51df Removed commented out code. 2019-09-07 15:43:30 -07:00
7913ae76f8 Expand pwd command
Expand functionality of the pwd command to better handle the different
types of shells (e.g. FilesystemShell, ValueShell, etc.).
2019-09-07 15:31:16 -07:00
90b358d60b Merge pull request #612 from chhetripradeep/pchhetri/add-pwd-command
Adds pwd command
2019-09-08 06:02:38 +12:00
ee301f9f54 Adds pwd command 2019-09-07 23:53:56 +08:00
8be14a891d Merge pull request #611 from jonathandturner/autoview_plugin
Protect autoview against missing plugins
2019-09-07 20:09:58 +12:00
28fe31d565 Protect autoview against missing plugins 2019-09-07 19:32:07 +12:00
e2b9370f10 Attempt to fix issue with ^C in Windows
This fixes the error case if we ^C during running an external command.  This needs testing across platforms before it lands.
2019-09-07 16:59:13 +12:00
ea24571c22 Remove added newline 2019-09-06 23:24:29 -04:00
1b2fdf7c1e Fix bug with ls globbing a single directory 2019-09-06 23:20:13 -04:00
b84c77d23a Merge pull request #603 from jonathandturner/oop_to_table
Move internal terminology to tables/rows
2019-09-06 05:22:24 +12:00
dcd97b6346 Move internal terminology to tables/rows 2019-09-06 04:23:42 +12:00
ede45e21de Merge pull request #597 from jonathandturner/spreadsheet_terms
Move us away from OOP terms to spreadsheet terms
2019-09-05 04:56:16 +12:00
fd715e1775 Merge pull request #596 from Porges/improve-pipeline-parsing
Improve parsing of pipelines, require pipes between segments
2019-09-04 09:41:49 -07:00
0a9897c5ca Move us away from mixing OOP and spreadsheet to just spreadsheet 2019-09-05 04:29:49 +12:00
60212611e5 Allow leading space before head of pipeline 2019-09-05 04:13:07 +12:00
6034de641a Improve parsing of pipelines, require pipes
At the moment the pipeline parser does not enforce
that there must be a pipe between each part of the pipeline,
which can lead to confusing behaviour or misleading errors.
2019-09-05 03:30:51 +12:00
479f0a566e Covert to_* commands to work on whole table 2019-09-04 18:48:40 +12:00
1f05e98965 Refactor to make save.rs readable 2019-09-03 22:21:37 -04:00
ab48d3a3f2 Support binary save 2019-09-03 21:50:23 -04:00
ab97459d0e Stop printing CTRL-D on EOF 2019-09-03 21:40:42 +02:00
3256b7adb3 if path to ls given that does not exist, report the error. 2019-09-03 05:24:04 -05:00
1d0ed7e957 ls lists contents of value entered with or without path given. 2019-09-03 05:17:44 -05:00
b031d4cd77 can view list of commands for details. 2019-09-03 04:36:23 -05:00
030d73147e can view help for a given command by entering a command. 2019-09-03 04:05:52 -05:00
a449d2c005 If path to cd given. Report the error with the path given. 2019-09-03 03:49:20 -05:00
b0a02518f9 cd can be awared inside a value entered. 2019-09-03 02:43:37 -05:00
8a9cdcab17 Split fetch command away from open 2019-09-03 18:04:46 +12:00
7bd2fa1bfc Merge pull request #580 from est31/trailing_spaces
Trim trailing whitespace and set it in editorconfig
2019-09-03 16:25:41 +12:00
1464feaab7 Merge pull request #579 from est31/serde_instead_of_specialization
Use serde instead of specialization
2019-09-03 16:24:55 +12:00
cf0efb811e Trim trailing whitespace and set it in editorconfig 2019-09-03 02:52:52 +02:00
35d576f540 Remove use of specialization 2019-09-03 02:13:41 +02:00
225ef8e75d Use serde to deserialize the remaining things 2019-09-03 02:10:48 +02:00
cc8872b4ee Use serde to deserialize Tagged<Value> 2019-09-03 01:41:26 +02:00
9ba2e75ac1 Move code into separate visit function 2019-09-03 01:32:54 +02:00