Commit Graph

2680 Commits

Author SHA1 Message Date
Chris Gillespie
5a725f9651
Num links added to ls -l output (#2496) 2020-09-06 12:36:50 -04:00
Abhi V
79cc725aff
Interpreting ranges for substring (#2499) 2020-09-06 12:35:11 -04:00
Darren Schroeder
e2cbc4e853
Weather symbol cleanup (#2502)
* WIP - compiling but not working

* semi-working

* making progress

* working except for table lines

* fmt + clippy

* cleaned up some comments

* working line colors

* fmt, clippy, updated sample config.toml

* merges

* clean up some comments
2020-09-05 14:52:49 -05:00
Darren Schroeder
b5a27f0ccb
pr to get my main in sync (#2501)
* WIP - compiling but not working

* semi-working

* making progress

* working except for table lines

* fmt + clippy

* cleaned up some comments

* working line colors

* fmt, clippy, updated sample config.toml

* merges
2020-09-05 13:13:34 -05:00
Darren Schroeder
bdb12f4bff
Weather chars (#2500)
* WIP - compiling but not working

* semi-working

* making progress

* working except for table lines

* fmt + clippy

* cleaned up some comments

* working line colors

* fmt, clippy, updated sample config.toml

* merges

* added weather symbols/chars
2020-09-05 13:13:07 -05:00
Jason Gedge
c9c29f9e4c
Remove space from command name completion suggestion. (#2498)
Although convenient, since the user doesn't have to type the space, it could be
a little surprising to users since they may think that was the only completion
in certain completions modes (for example, `cycle`).
2020-09-05 15:15:20 +12:00
Aleš Katona
32951f1161
implement exec for unix platforms (#2495) 2020-09-04 22:27:01 -04:00
Jason Gedge
56f85b3108
Provide path as part of the suggestion from the path completer. (#2497) 2020-09-04 22:10:26 -04:00
Abhi V
16f85f32a2
ls **/* does not show hidden files without the -a flag (#2407)
* fixed: .*.(ext|*)

* ls **/* does not return hidden files without the -a flag

* fixed formatting

* fixed clippy issues

* fixed clippy issues, v2

* added `#[cfg(unix)]` to windows-failing test
2020-09-05 07:32:58 +12:00
Darren Schroeder
2ae2f2ea9d
Ensure ansi mode windows (#2494)
* WIP - compiling but not working

* semi-working

* making progress

* working except for table lines

* fmt + clippy

* cleaned up some comments

* working line colors

* fmt, clippy, updated sample config.toml

* merges

* ensure ansi mode is enabled on windows
ansi mode sometimes gets out of sync in Windows.
I'm not sure why but this appears to fix it.
2020-09-04 14:24:46 -05:00
Aleš Katona
4696c9069b
use fs_extra to recursively move folders (#2487) 2020-09-04 11:44:53 +12:00
smaydew
1ffbb66e64
Initial implementation of random integer subcommand. (#2489)
* Initial implementation of random integer subcommand.

* Added additional examples.

Co-authored-by: Stacy Maydew <stacy.maydew@starlab.io>
2020-09-04 07:23:02 +12:00
Darren Schroeder
8dc7b8a7cd
Update clipboard feature (#2491)
* WIP - compiling but not working

* semi-working

* making progress

* working except for table lines

* fmt + clippy

* cleaned up some comments

* working line colors

* fmt, clippy, updated sample config.toml

* merges

* shouldn't these both bet clipboard-cli?
2020-09-04 07:21:32 +12:00
Chris Gillespie
666e6a7b57
Size: count unicode graphmemes as single char (#2482) 2020-09-03 04:54:00 +12:00
Jonathan Turner
47c5346934
Update release.yml
Fix github workflow to use extra instead of stable
2020-09-02 16:17:06 +12:00
Jonathan Turner
882cf74137
Bump to 0.19.0 (#2483) 2020-09-02 15:37:06 +12:00
Darren Schroeder
57a26bbd42
Default alignment (#2481)
* WIP - compiling but not working

* semi-working

* making progress

* working except for table lines

* fmt + clippy

* cleaned up some comments

* working line colors

* fmt, clippy, updated sample config.toml

* merges

* fixed bug where no config.toml or not set settings made weird defaults.

* clippy & fmt again

* Header default alignment is left.

Co-authored-by: Andrés N. Robalino <andres@androbtech.com>
2020-09-01 19:08:41 -05:00
Jason Gedge
f9acb7a7a5 Support ~ (home directory) in completions.
This requires a bit of a hack in command completions, since we don't expand `~`
for the replacement, just long enough to get child entries.
2020-09-01 18:31:36 -05:00
Darren Schroeder
569345e1d4
Color info for config.toml (#2478)
* WIP - compiling but not working

* semi-working

* making progress

* working except for table lines

* fmt + clippy

* cleaned up some comments

* working line colors

* fmt, clippy, updated sample config.toml

* merges

* some info on how to set colors
2020-09-01 08:48:27 -05:00
Darren Schroeder
adbbcafd30
Add minor theme support (#2449)
* WIP - compiling but not working

* semi-working

* making progress

* working except for table lines

* fmt + clippy

* cleaned up some comments

* working line colors

* fmt, clippy, updated sample config.toml

* removed extra comments
2020-09-01 17:09:55 +12:00
Jason Gedge
860c2a606d
More bug fixes for completions (#2476)
* Use the cursor position for the span when between locations.

This fixes a bug where completing

    ls <TAB>

would result in replacing the entire line.

* Revert to the default update implementation.

Replacing the length of the elected value was intended to do replacement when
one moves inside a quote. The problem is that a long elected suggestion could
replace bits of a pipeline that are after the cursor. For example:

    ls <TAB> | get name | str collect
2020-09-01 16:10:46 +12:00
Chris Gillespie
6b5d96337e
Add examples to uniq (#2472) 2020-09-01 14:52:55 +12:00
Chris Gillespie
f54cf8a096
Size command: rename max length to bytes (#2473)
Since max length is just getting the byte length, rename to bytes
in order to be more clear.
2020-09-01 14:51:35 +12:00
Jason Gedge
b5d591bb09
Improve support for completing within quotes. (#2474)
We ensure the partially cimpleted item doesn't include the end quote. We also
ensure that the appropriate span is replaced, not just the suggested position up
to the cursor position.
2020-09-01 14:13:00 +12:00
Jason Gedge
60ce497edc
Only requote path arguments. (#2471) 2020-08-31 20:11:39 -04:00
gorogoroumaru
dd4351e2b7
tolerate os error while executing ls command (#2466) 2020-09-01 05:14:37 +12:00
Darren Schroeder
3f443f40d0
with_love table theme (#2468) 2020-08-31 11:50:32 -05:00
Darren Schroeder
8192360b20
added compact_double table theme for funsies (#2467) 2020-08-31 09:49:27 -05:00
Jason Gedge
889b67ca92
Improve quoting for path completions. (#2464)
- Ensure quotes surround suggestion replacement when there are spaces.
- Ensure an appropriate quote character is chosen based on other quoting
  characters being in the suggestions.
2020-08-31 15:29:13 +12:00
Jonathan Turner
8d1cecf643
Set auto-pivot to never by default (#2462) 2020-08-31 14:38:08 +12:00
Jason Gedge
188d33b306
Add a custom path completer to nushell. (#2463)
Previously, we used rustyline's filename completer. This allowed us to make
progress on the completion engine without building all the parts at once. We now
need our own filename completer to make progress.

The primary driver to having our own filename completer is that it can better
integrate with our path constructs. For example, if we have

    > ls .../<TAB>

we want to show a list of suggestions that includes all files two directories up
from the current working directory. The least jarring experience to a user would
be to maintain the three dots. The easiest way for us to do this is by building
our own completer and path constructs.
2020-08-30 22:28:09 -04:00
Chris Gillespie
965e07d8cc
Minor updates to variance (#2458) 2020-08-30 16:50:36 -04:00
VincentWo
d6b6b1df38
Changing the directory to '.' doesn't modify the prompt anymore (#2457)
Doing 'cd .' or an equal command used to modify the prompt: It appended an './' and was even
repeatable, leading to strange prompts (believe me, I tested it for too long).

This fixes #2432
2020-08-31 05:24:38 +12:00
Jonathan Turner
c897ac6e1e
Add support for multiline rustyline edits (#2456)
* Add support for multiline rustyline edits

* clippy
2020-08-30 20:00:28 +12:00
Jonathan Turner
df691c6c91
Light fixes (#2455)
* Add optional commas for items in lists and tables

* A couple last fixes
2020-08-30 19:03:18 +12:00
Jonathan Turner
abc05ece21
Add optional commas for items in lists and tables (#2454) 2020-08-30 18:19:54 +12:00
Jonathan Turner
6f69ae8707
Add table literals (#2453)
* Add table literals

* clippy
2020-08-30 16:55:33 +12:00
Chris Gillespie
84a6010f71
Minor stddev updates (#2452)
1. Add an example for getting the sample stddev
2. Opt for ? instead of generic Err match
2020-08-30 15:36:43 +12:00
Marco Ieni
634bb688c1
CONTRIBUTING: useful commands as list (#2448) 2020-08-30 15:33:28 +12:00
Chris Gillespie
c14b209276
Add missing math commands to docs (#2447) 2020-08-30 15:32:38 +12:00
Jason Gedge
6535ae3d6e
Show directories and executable for command completion. (#2446)
* Show directories and executable for command completion.

Previously we chose from two sets for completing the command position:

1. internal commands, and
2. executables relative to the PATH environment variable.

We now also show directories/executables that match the relative/absolute path
that has been partially typed.

* Fix for Windows
2020-08-30 15:31:42 +12:00
Chris Gillespie
0390ec97f4
Create benign email test fixture (#2445)
1. The previous one was an Ebay email and flagged by AVs, create something simple.
2. Add test case for another header
2020-08-29 12:57:50 -04:00
Jason Gedge
e3c4d82798
Ensure command name available for Argument completion locations (#2443) 2020-08-28 19:50:46 -04:00
gorogoroumaru
ee71a35786
make cd command complete only folders (#2431) 2020-08-28 14:38:30 -04:00
Dillen Meijboom
11ea5e61fc
Fix out of bounds in header command when row size is different (#2437)
* Use header vec to loop over the row instead of the row itself to fix out of bounds

* Fixed formatting
2020-08-29 06:32:08 +12:00
Andrés N. Robalino
02763b47f7 Add spans to pipelines. 2020-08-28 05:17:58 -05:00
Jonathan Turner
4828a7cd29
Update config.yml 2020-08-28 06:02:06 +12:00
Jason Gedge
728852c750
Remove unnecessary reference to ichwh in command completer (#2435) 2020-08-27 10:14:04 -04:00
Andrés N. Robalino
26cec83b63 Extract out history parts. 2020-08-27 06:28:18 -05:00
Andrés N. Robalino
4724b3c570 Slim down cli plugin logic. 2020-08-27 06:28:18 -05:00