mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-13 18:07:51 +08:00
Abbreviate dir names in location and speed up history (#654)
- Pass directories through tilde-abbr before displaying them - Leave tabs and newlines in history mode. Makes it MUCH faster for the listing to appear.
This commit is contained in:
parent
0f1bf8cf10
commit
4ed724a0a3
|
@ -15,7 +15,7 @@ const narrowElv = `
|
|||
# but different keys can be specified with the options. To disable a
|
||||
# binding, specify its key as "".
|
||||
# Example:
|
||||
# narrow:bind-trigger-keys &location=Alt-l &lastcmd=""
|
||||
# narrow:bind-trigger-keys &location=Alt-l &lastcmd=""
|
||||
|
||||
# Hooks
|
||||
# Each hook variable is an array which must contain lambdas, all of
|
||||
|
@ -36,7 +36,7 @@ fn location {
|
|||
score = (splits . $arg[score] | take 1)
|
||||
put [
|
||||
&content=$arg[path]
|
||||
&display=$score" "$arg[path]
|
||||
&display=$score" "(tilde-abbr $arg[path])
|
||||
]
|
||||
})]
|
||||
|
||||
|
@ -53,7 +53,7 @@ fn history {
|
|||
candidates = [(edit:command-history | each [arg]{
|
||||
put [
|
||||
&content=$arg[cmd]
|
||||
&display=$arg[id]" "(replaces "\t" " " (replaces "\n" " " $arg[cmd]))
|
||||
&display=$arg[id]" "$arg[cmd]
|
||||
]
|
||||
})]
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user