mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 13:39:02 +00: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
1 changed files with 8 additions and 0 deletions
|
@ -254,6 +254,14 @@ const wcstring &completion_entry_t::get_short_opt_str() const {
|
||||||
/* completion_t functions */
|
/* completion_t functions */
|
||||||
completion_t::completion_t(const wcstring &comp, const wcstring &desc, int flags_val) : completion(comp), description(desc), flags(flags_val)
|
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)
|
completion_t::completion_t(const completion_t &him) : completion(him.completion), description(him.description), flags(him.flags)
|
||||||
|
|
Loading…
Reference in a new issue