mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-04 10:57:50 +08:00
Document le:{,r}prompt.
This commit is contained in:
parent
6b625c0e8d
commit
f5fa5f9444
|
@ -24,6 +24,15 @@ Elvish mimics bash and zsh in a lot of places. The following shows some key diff
|
|||
|
||||
* Define aliases like `fn ls { external:ls --color $@ }`
|
||||
|
||||
* The left and right prompts and be customized by modifying `le:prompt` and `le:rprompt`. They can be assigned either to a function, in which their outputs are used, or a constant string. The following simulates the default prompts:
|
||||
|
||||
```sh
|
||||
# Changes during a session; use function
|
||||
le:prompt={ echo `tilde-abbr $pwd`'> ' }
|
||||
# Doesn't change during a session; use constant string
|
||||
le:rprompt=`whoami`@`hostname`
|
||||
```
|
||||
|
||||
* Press Up to search through history. It uses what you have typed to do prefix match. To cancel, press Escape.
|
||||
|
||||
* Press Tab to start completion. Use arrow key and Tab to select the candidate; press Enter, or just continue typing to accept. To cancel, press Enter.
|
||||
|
|
Loading…
Reference in New Issue
Block a user