Commit Graph

1326 Commits

Author SHA1 Message Date
Barnaby Keene
0412c3a2f8 fix: remove the additional characters from highlighter
This resolves a small integration issue that would make custom prompts problematic (if they are implemented). The approach was to use the highlighter implementation in Helper to insert colour codes to the prompt however it heavily relies on the prompt being in a specific format, ending with a `> ` sequence. However, this should really be the job of the prompt itself not the presentation layer.

For now, I've simply stripped off the additional `> ` characters and passed in just the prompt itself without slicing off the last two characters. I moved the `\x1b[m` control sequence to the prompt creation in `cli.rs` as this feels like the more logical home for controlling what the prompt looks like. I can think of better ways to do this in future but this should be a fine solution for now.

In future it would probably make sense to completely separate prompts (be it, internal or external) from this code so it can be configured as an isolated piece of code.
2019-10-08 21:39:58 +01:00
Barnaby Keene
ef3e8eb778 fix: update Cargo.lock with correct hash for starship fork 2019-10-08 21:16:52 +01:00
Barnaby Keene
fb8cfeb70d feat: starship prompt
Kind of touches on #356 by integrating the Starship prompt directly into the shell.

Not finished yet and has surfaced a potential bug in rustyline anyway. It depends on https://github.com/starship/starship/pull/509 being merged so the Starship prompt can be used as a library.

I could have tackled #356 completely and implemented a full custom prompt feature but I felt this was a simpler approach given that Starship is both written in Rust so shelling out isn't necessary and it already has a bunch of useful features built in.

However, I would understand if it would be preferable to just scrap integrating Starship directly and instead implement a custom prompt system which would facilitate simply shelling out to Starship.
2019-10-08 16:25:12 +01:00
Jonathan Turner
a882e640e4
Merge pull request #793 from chhetripradeep/pchhetri/enter
Add documentation for the enter command
2019-10-08 06:02:49 +13:00
Pradeep Chhetri
c09d866a77 Add documentation for the enter command 2019-10-07 23:21:58 +08:00
Jonathan Turner
4467e59122
Merge pull request #792 from chhetripradeep/pchhetri/open
Add documentation for the open command
2019-10-07 11:17:28 +11:00
Jonathan Turner
9c096d320a
Merge pull request #797 from chhetripradeep/pchhetri/fetch
Add documentation for the fetch command
2019-10-07 11:16:36 +11:00
Pradeep Chhetri
9f15017032 Add documentation for the fetch command 2019-10-07 02:17:57 +08:00
Pradeep Chhetri
81fec11f88 Add documentation for the open command 2019-10-07 02:08:20 +08:00
Jonathan Turner
8a6a688131
Merge pull request #795 from chhetripradeep/pchhetri/inc
Add documentation for the inc command
2019-10-07 04:35:08 +11:00
Jonathan Turner
77a4de31fa
Merge pull request #794 from chhetripradeep/pchhetri/sys
Add documentation for the sys command
2019-10-07 04:33:51 +11:00
Jonathan Turner
09e88d127e
Merge pull request #791 from chhetripradeep/pchhetri/trim
Add documentation for the trim command
2019-10-07 04:30:52 +11:00
Pradeep Chhetri
7ff5734d5d Add documentation for the inc command 2019-10-06 23:30:52 +08:00
Pradeep Chhetri
1d19595996 Add documentation for the sys command 2019-10-06 23:20:48 +08:00
Pradeep Chhetri
7d115da782 Add documentation for the trim command 2019-10-06 22:35:38 +08:00
Andrés N. Robalino
b066775630
Merge pull request #789 from cristicismas/patch-1
Update cd.md to look better
2019-10-04 16:24:42 -05:00
Andrés N. Robalino
8bb6bcb6eb
Merge pull request #790 from mfarberbrodsky/add-nth-docs
Add documentation for nth command
2019-10-04 16:24:06 -05:00
Maya Farber Brodsky
20031861b9 Add documentation for nth command 2019-10-04 17:37:11 +03:00
Cristi Cismas
eb297d3b8f
Update cd.md to look better 2019-10-04 15:10:46 +03:00
Andrés N. Robalino
8faa0126eb
Merge pull request #784 from coolshaurya/to-dash-sth-docs
Added docs for most of the to-sth commands
2019-10-03 21:47:00 -05:00
Shaurya Shubham
6aec03708f Fix minor typo 2019-10-04 06:44:45 +05:30
Shaurya Shubham
2f7b1e4282 Added improvements suggested by @andrasio
Added `open file.sth | to-sth` type examples
Also did a format conversion example with `open jonathon.xml | to-json` in to-json.md
2019-10-04 06:40:16 +05:30
Andrés N. Robalino
7492131142
Merge pull request #770 from rnxpyke/master
add regex match plugin
2019-10-03 14:20:41 -05:00
Andrés N. Robalino
3c6ee63e59
Merge pull request #777 from JonnyWalker81/fix-get-panic
Attempt at fixing `get` command panic.
2019-10-03 14:02:51 -05:00
Andrés N. Robalino
45ad18f654
Merge pull request #785 from Charles-Schleich/master
Created Docs for env command
2019-10-03 14:00:51 -05:00
Andrés N. Robalino
01829f04d5
Merge pull request #783 from notryanb/document-last
add documentation for the last command
2019-10-03 13:59:41 -05:00
Andrés N. Robalino
cc1c471877
Merge pull request #779 from pema99/lines-doc
Add documentation for lines
2019-10-03 13:58:30 -05:00
Andrés N. Robalino
de14f9fce8
Merge pull request #781 from coolshaurya/add-command-docs
Create docs for add command
2019-10-03 13:38:11 -05:00
Andrés N. Robalino
6c3ed1dbc2
Merge pull request #782 from coolshaurya/docs-edit-command
Create docs for edit command
2019-10-03 13:37:49 -05:00
Charles Schleich
cf0fa3141a Created Docs for env command 2019-10-03 20:13:22 +02:00
Shaurya Shubham
539e232f3c Added docs for most of the to-sth commands
Partial fix of issue #711
Docs for the following commands were added -
to-csv
to-json
to-toml
to-tsv
to-url
to-yaml

Docs for to-db , to-bson , to-sqlite have not been added as I don't recognize and understand those formats.
2019-10-03 19:07:48 +05:30
Ryan Blecher
9ed889ccbb fix grammar 2019-10-03 08:18:51 -04:00
Ryan Blecher
872e26b524 add documentation for the last command 2019-10-03 08:14:59 -04:00
Shaurya Shubham
5bfff0c39b
Create docs for edit command
Partial fix of issue #711
2019-10-03 16:54:28 +05:30
Shaurya Shubham
0505a9d6f7
Create docs for add command
Partial fix of issue #711
2019-10-03 16:27:04 +05:30
rnxypke
9181a046ec use correct argument for error message 2019-10-03 08:21:24 +02:00
pema99
1b0eaac470 Add documentation for lines 2019-10-03 06:09:01 +02:00
Jonathan Rothberg
e54cd98a9c Put code into None case of last match. 2019-10-02 20:41:53 -07:00
Jonathan Rothberg
f3eb4fb24e Attempt at fixing get command panic.
If possible matches are not found then check if the passed in `obj`
parameter is a `string` or a `path`, if so then return it.  I am not
sure this is the right fix, but I figured I would make an attempt and
get a conversation started about it.
2019-10-02 20:16:27 -07:00
Jonathan Turner
04854d5d99
Merge pull request #776 from gilesv/where-command
Create where.md
2019-10-03 15:38:59 +13:00
Jonathan Turner
124a814f4d
Merge pull request #775 from JonnyWalker81/vi-textview-scroll
Added Vi support for scrolling in the textview command.
2019-10-03 15:19:11 +13:00
gilesv
2e1670fcb8 Add documentation for where command 2019-10-02 22:49:05 -03:00
Jonathan Rothberg
7d2747ea9a Added Vi support for scrolling in the textview command. 2019-10-02 18:45:23 -07:00
rnxypke
36f2b09cad run rustfmt on match plugin 2019-10-02 22:41:52 +02:00
rnxypke
be51aad9ad remove unused imports on match plugin 2019-10-02 22:24:37 +02:00
Jonathan Turner
97695b74dd
Merge pull request #771 from notryanb/document-first
add documentation file for first command
2019-10-03 09:09:33 +13:00
Ryan Blecher
9d84e47214 add documentation file for first command 2019-10-02 15:49:44 -04:00
rnxypke
9fb9adb6b4 add regex match plugin 2019-10-02 20:56:43 +02:00
Jonathan Turner
91e6d31dc6
Merge pull request #753 from JesterOrNot/master
Style README
2019-10-03 06:28:52 +13:00
Jonathan Turner
9a1c537854
Merge pull request #764 from coolshaurya/command-version-docs
Create docs for version command
2019-10-03 06:28:04 +13:00