46 Commits

Author SHA1 Message Date
Sam Hedin
3d213a63c5 Non-working errors 2020-06-22 18:42:46 +02:00
Sam Hedin
59cd51b132 Clippy 2020-06-22 16:53:27 +02:00
Sam Hedin
0215e4c1b6 Merge remote-tracking branch 'upstream/master' into direnv-rewrite 2020-06-22 16:42:54 +02:00
Sam Hedin
3a0ada6486 Start using autoenv 2020-06-22 15:43:40 +02:00
Sam Hedin
a173817889 Cleanup, stop tracking overwritten values as nu takes care of it 2020-06-18 07:25:45 +02:00
Andrés N. Robalino
94aac0e8dd Remove unused pattern matched tag fields. 2020-06-17 13:34:17 -05:00
Sam Hedin
233d864f47 Restore overwritten vals code 2020-06-17 14:06:10 +02:00
Sam Hedin
542d7ac2a1 Ready for testing 2020-06-17 13:27:37 +02:00
Sam Hedin
b6a7f56a1e Reworking adding of vars 2020-06-17 12:18:40 +02:00
Sam Hedin
688df20a30 Error handling 2020-06-17 00:23:03 +02:00
Sam Hedin
2f4f8632de nicer errors 2020-06-16 11:01:11 +02:00
Sam Hedin
06b1122564 Working? 2020-06-15 18:31:04 +02:00
Sam Hedin
28f01e92b7 Deletion almost works 2020-06-15 18:21:27 +02:00
Sam Hedin
6a0b4d1122 Add type aliases for String and OsString 2020-06-15 18:15:30 +02:00
Sam Hedin
730f9ca30a Error handling 2020-06-15 15:42:09 +02:00
Sam Hedin
3fbbe6e322 Refactor restore function 2020-06-14 11:37:20 +02:00
Sam Hedin
0beb32de52 Overwritten env values tracks an indexmap instead of vector 2020-06-14 10:48:08 +02:00
Sam Hedin
862ff60b3e rewrite everything 2020-06-10 08:33:04 +02:00
Sam Hedin
bf459e09cb
WIP: Per directory env-variables (#1943)
* Add args in .nurc file to environment

* Working dummy version

* Add add_nurc to sync_env command

* Parse .nurc file

* Delete env vars after leaving directory

* Removing vals not working, strangely

* Refactoring, add comment

* Debugging

* Debug by logging to file

* Add and remove env var behavior appears correct

However, it does not use existing code that well.

* Move work to cli.rs

* Parse config directories

* I am in a state of distress

* Rename .nurc to .nu

* Some notes for me

* Refactoring

* Removing vars works, but not done in a very nice fashion

* Refactor env_vars_to_delete

* Refactor env_vars_to_add()

* Move directory environment code to separate file

* Refactor from_config

* Restore env values

* Working?

* Working?

* Update comments and change var name

* Formatting

* Remove vars after leaving dir

* Remove notes I made

* Rename config function

* Clippy

* Cleanup and handle errors

* cargo fmt

* Better error messages, remove last (?) unwrap

* FORMAT PLZ

* Rename whitelisted_directories to allowed_directories

* Add comment to clarify how overwritten values are restored.
2020-06-08 19:55:25 +12:00
Sam Hedin
ff742ed675 Clippy 2020-06-07 06:55:38 +02:00
Sam Hedin
e4c951fe93 Rename config function 2020-06-06 13:26:42 +02:00
Sam Hedin
d6e1a0e616 Remove vars after leaving dir 2020-06-06 12:53:45 +02:00
Sam Hedin
4fdc3646e8 Working? 2020-06-06 11:54:33 +02:00
Sam Hedin
c618538cf8 Working? 2020-06-06 11:45:58 +02:00
Sam Hedin
6974eb0994 Restore env values 2020-06-06 08:19:16 +02:00
Sam Hedin
a0cedfce8d Refactor from_config 2020-06-06 06:27:28 +02:00
Sam Hedin
6ce5a87c30 Move directory environment code to separate file 2020-06-06 06:02:15 +02:00
Sam Hedin
14e12f57b0 Refactor env_vars_to_add() 2020-06-06 05:48:25 +02:00
Sam Hedin
fb6eb1924f Refactor env_vars_to_delete 2020-06-06 03:51:50 +02:00
Sam Hedin
3a278b38da Removing vars works, but not done in a very nice fashion 2020-06-06 02:54:27 +02:00
Sam Hedin
8498c673bd Refactoring 2020-06-06 02:10:36 +02:00
Sam Hedin
0ee54a3418 Rename .nurc to .nu 2020-06-05 05:31:52 +02:00
Sam Hedin
0f0485957a Parse config directories 2020-06-05 04:00:52 +02:00
Sam Hedin
e97e883d1f Move work to cli.rs 2020-06-05 01:23:55 +02:00
Sam Hedin
3aeddee2fe Add and remove env var behavior appears correct
However, it does not use existing code that well.
2020-06-04 23:43:26 +02:00
Sam Hedin
24d2e88e0f Debug by logging to file 2020-06-04 23:17:55 +02:00
Sam Hedin
fe4a51eef4 Debugging 2020-06-04 05:31:37 +02:00
Sam Hedin
6e72386360 Refactoring, add comment 2020-06-04 05:30:28 +02:00
Sam Hedin
de0c252e27 Removing vals not working, strangely 2020-06-04 04:37:02 +02:00
Sam Hedin
c67d93dae1 Delete env vars after leaving directory 2020-06-04 04:02:54 +02:00
Sam Hedin
48e4bb60d0 Parse .nurc file 2020-06-04 02:14:49 +02:00
Sam Hedin
8eaaddca8f Add add_nurc to sync_env command 2020-06-04 01:16:07 +02:00
Sam Hedin
3d15ac076c Working dummy version 2020-06-04 01:13:04 +02:00
Sam Hedin
83795a3e70 Add args in .nurc file to environment 2020-06-04 01:07:39 +02:00
Jonathan Turner
c86cf31aac
some minor improvements and removing dead code (#1563) 2020-04-10 07:48:10 +12:00
Jason Gedge
b2c5af457e
Move most of the root package into a subcrate. (#1445)
This improves incremental build time when working on what was previously
the root package. For example, previously all plugins would be rebuilt
with a change to `src/commands/classified/external.rs`, but now only
`nu-cli` will have to be rebuilt (and anything that depends on it).
2020-03-04 13:58:20 -05:00