mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 02:13:38 +08:00
Make tab-completion truncation less dumb
Fixes https://github.com/fish-shell/fish-shell/issues/259
This commit is contained in:
parent
1dfa404210
commit
0302162d8e
|
@ -111,7 +111,7 @@ commence.
|
||||||
Maximum length of prefix string when printing completion
|
Maximum length of prefix string when printing completion
|
||||||
list. Longer prefixes will be ellipsized.
|
list. Longer prefixes will be ellipsized.
|
||||||
*/
|
*/
|
||||||
#define PREFIX_MAX_LEN 8
|
#define PREFIX_MAX_LEN 9
|
||||||
|
|
||||||
/**
|
/**
|
||||||
A simple prompt for reading shell commands that does not rely on
|
A simple prompt for reading shell commands that does not rely on
|
||||||
|
@ -1556,7 +1556,7 @@ static bool handle_completions( const std::vector<completion_t> &comp )
|
||||||
{
|
{
|
||||||
// append just the end of the string
|
// append just the end of the string
|
||||||
prefix = wcstring(&ellipsis_char, 1);
|
prefix = wcstring(&ellipsis_char, 1);
|
||||||
prefix.append(data->command_line, prefix_start + len - PREFIX_MAX_LEN, wcstring::npos);
|
prefix.append(data->command_line, prefix_start + len - PREFIX_MAX_LEN - 1, wcstring::npos);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user