1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00
Commit graph

7 commits

Author SHA1 Message Date
Kyrylo Silin
bc26e405ea Simplify Prompt API
Before this change when you set a prompt, you have to do the following:

```rb
Pry.config.prompt = Pry::Prompt[:simple][:value]
```

The `[:value]` part was leaking implementation details and it proved to be an
unnecessary step.

With this change we can do the following:

```rb
Pry.config.prompt = Pry::Prompt[:simple]
```

`[:value]` is omitted.

I have also refactored some tests and removed irrelevant ones.

The Array API for prompt is deprecated:
`Pry.config.prompt = [proc {}, proc {}]` emits a warning now.
2018-11-17 05:26:25 +08:00
robert
95e57c8c7b fix syntax hightlighting of change_prompt.rb
let's try to avoid exotic heredoc syntax that GitHub and multiple
editors cannot support, the only confirmed editor that supports
highlighting this syntax so far is 'emacs'.

it is not friendly to non-emacs users to have to deal with broken
syntax highlighting, especially when there is a less exotic and
easier syntax available.
2018-11-14 02:37:07 +01:00
robert
cf2189351a fix syntax hightlighting of prompt.rb on GitHub & multiple editors. 2018-11-10 17:15:36 +01:00
Kyrylo Silin
60f20f8857 commands/change_prompt: incorporate 'list_prompts' functionality
Fixes #1829 (Merge `list-prompts` and `change-prompt` into one command)
2018-11-04 05:16:32 +08:00
Kyrylo Silin
3da930f908 prompt: add basic API for adding prompts
Fixes #1836 (Add an API for adding new prompts)
2018-11-04 02:11:15 +08:00
Ryan Fitzgerald
20cdc22917 Various copy changes
Improves consistency of capitalization and punctuation across various
help text, plus some rewording and consolidating command groups.
2014-05-05 00:50:44 -07:00
Robert Gleeson
e617c7d420 add 'list-prompts' and 'change-prompt' commands.
the list-prompts command shows a list of available prompts as well
as the active prompt in the list. prompts are drawn with a name as
well as a short description.

change-prompt can be used to change the prompt by the name found in
the list-prompts command.
2014-03-19 14:53:28 +01:00