mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 06:41:42 +08:00
Don't add space at the end of tab completion for cd
Fix for https://github.com/fish-shell/fish-shell/issues/235
This commit is contained in:
parent
d06d6c6964
commit
e284233013
|
@ -254,6 +254,14 @@ const wcstring &completion_entry_t::get_short_opt_str() const {
|
|||
/* completion_t functions */
|
||||
completion_t::completion_t(const wcstring &comp, const wcstring &desc, int flags_val) : completion(comp), description(desc), flags(flags_val)
|
||||
{
|
||||
if( flags & COMPLETE_AUTO_SPACE )
|
||||
{
|
||||
flags = flags & ~COMPLETE_AUTO_SPACE;
|
||||
size_t len = completion.size();
|
||||
if (len > 0 && ( wcschr( L"/=@:", comp.at(len-1)) != 0 ))
|
||||
flags |= COMPLETE_NO_SPACE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
completion_t::completion_t(const completion_t &him) : completion(him.completion), description(him.description), flags(him.flags)
|
||||
|
|
Loading…
Reference in New Issue
Block a user