You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned in #4061, completing somecommand ~ does not offer the obvious ~/ (i.e. the current user's home directory).
I don't think it ever did, which is why I'm filing this as an enhancement.
Also, since these are directories, it might be better to complete all of these with a trailing "/" (like we do for directories in general), since there's no valid suffix otherwise (though tilde-expansion passes through the literal if it doesn't expand - e.g. ~nonexistentuser expands to ~nonexistentuser).
Thinking about this, I'm really not convinced ~/ should be offered as a completion at all.
Every time I have ever used ~<TAB>, it's specifically because I want to complete another user's directory, never because I want to complete my own. If I did, I would just manually type ~/ (which I assume is muscle memory for the vast majority of shell users).
It's also fewer keystrokes than typing ~<TAB> and then finding ~/ in a list of suggestions. Besides, my own user directory is still offered in its expanded form in the list of suggestions if I really wanted to ~<TAB> complete it for some strange reason.
it might be better to complete all of these with a trailing "/" (like we do for directories in general)
I agree with this – it would also solve the "nonexistent directory" issue described in #4075 (comment) (i.e. don't append a / if the directory doesn't exist).
Reacted by Adam Quinn Snow, Bertrand Bonnefoy-Claudet and Simon Marache
Activity
gechr commentedon Jun 3, 2017
Thinking about this, I'm really not convinced
~/should be offered as a completion at all.Every time I have ever used
~<TAB>, it's specifically because I want to complete another user's directory, never because I want to complete my own. If I did, I would just manually type~/(which I assume is muscle memory for the vast majority of shell users).It's also fewer keystrokes than typing
~<TAB>and then finding~/in a list of suggestions. Besides, my own user directory is still offered in its expanded form in the list of suggestions if I really wanted to~<TAB>complete it for some strange reason.I agree with this – it would also solve the "nonexistent directory" issue described in #4075 (comment) (i.e. don't append a
/if the directory doesn't exist).