Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] sftp autocompletion
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
chi86
Apprentice
Apprentice


Joined: 30 Jul 2013
Posts: 184
Location: Austria

PostPosted: Mon Oct 12, 2015 6:10 am    Post subject: [SOLVED] sftp autocompletion Reply with quote

Hi,
is there a reason why with gentoo (not sure if that is just a problem of my setup?) the sftp autocompletion won't work? Is there a fix?

Thx!


Last edited by chi86 on Thu Oct 15, 2015 7:10 am; edited 1 time in total
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Mon Oct 12, 2015 8:01 am    Post subject: Reply with quote

In case you don't find an answer you could use lftp as a sftp client.
Back to top
View user's profile Send private message
chi86
Apprentice
Apprentice


Joined: 30 Jul 2013
Posts: 184
Location: Austria

PostPosted: Tue Oct 13, 2015 5:09 am    Post subject: Reply with quote

Thanks for the workaround but with all the other linux distributions I tried so far it worked without any additional effort.... why not here?
Back to top
View user's profile Send private message
chi86
Apprentice
Apprentice


Joined: 30 Jul 2013
Posts: 184
Location: Austria

PostPosted: Tue Oct 13, 2015 5:09 am    Post subject: Reply with quote

Thanks for the workaround but with all the other linux distributions I tried so far it worked without any additional effort.... why not here?
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Tue Oct 13, 2015 5:47 am    Post subject: Reply with quote

chi86 wrote:
Thanks for the workaround but with all the other linux distributions I tried so far it worked without any additional effort.

If so, you could open a new bug for that missing feature.
Back to top
View user's profile Send private message
chi86
Apprentice
Apprentice


Joined: 30 Jul 2013
Posts: 184
Location: Austria

PostPosted: Tue Oct 13, 2015 5:49 am    Post subject: Reply with quote

charles17 wrote:
If so, you could open a new bug for that missing feature.


Ok I will but I try a bit more befor I open a bug report!


Last edited by chi86 on Tue Oct 13, 2015 11:31 am; edited 1 time in total
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Tue Oct 13, 2015 6:08 am    Post subject: Reply with quote

chi86 wrote:
Ok I will but I try a bit more befor I open a bug report!

Once you have the solution it would be nice to have it in the wiki article.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue Oct 13, 2015 1:09 pm    Post subject: Reply with quote

chi86 wrote:
Thanks for the workaround but with all the other linux distributions I tried so far it worked without any additional effort.... why not here?

chi86 ... not being a bash user I can only guess ... does 'eselect bashcomp list' show an s{sh,ftp} completion, and is it enabled?

See this discussion on the subject.

HTH & best ... khay
Back to top
View user's profile Send private message
chi86
Apprentice
Apprentice


Joined: 30 Jul 2013
Posts: 184
Location: Austria

PostPosted: Tue Oct 13, 2015 1:25 pm    Post subject: Reply with quote

khayyam wrote:
does 'eselect bashcomp list' show an s{sh,ftp} completion, and is it enabled?


I had to install bash-completion first and than by executing:
Code:
select bashcomp list | grep ftp

I get:
Code:
 [354] lftp *
  [355] lftpget *
  [462] ncftp *
  [637] sftp *


So thats not it!
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Wed Oct 14, 2015 10:52 am    Post subject: Reply with quote

chi86 wrote:
khayyam wrote:
does 'eselect bashcomp list' show an s{sh,ftp} completion, and is it enabled?

I had to install bash-completion first [...] So thats not it!

chi86 ... just to be sure, you did restart the shell after installing bash-completion?

best ... khay
Back to top
View user's profile Send private message
chi86
Apprentice
Apprentice


Joined: 30 Jul 2013
Posts: 184
Location: Austria

PostPosted: Wed Oct 14, 2015 11:30 am    Post subject: Reply with quote

:D I did now but it still won't work!
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Wed Oct 14, 2015 11:59 am    Post subject: Reply with quote

chi86 wrote:
I did now but it still won't work!

chi86 ... you mean completion in general, or sftp only? Is the system wide bashrc being sourced?

Code:
$ env -i bash -l --norc

best ... khay
Back to top
View user's profile Send private message
chi86
Apprentice
Apprentice


Joined: 30 Jul 2013
Posts: 184
Location: Austria

PostPosted: Wed Oct 14, 2015 1:01 pm    Post subject: Reply with quote

It works everywhere perfectly fine but with sftp.

khayyam wrote:
Code:
$ env -i bash -l --norc


This won't work but I rebooted the pc in the meantime!
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Wed Oct 14, 2015 4:58 pm    Post subject: Reply with quote

Code:
$ env -i bash --login --norc

... as I said, I'm not a bash user ... zsh has the short -l, obviously bash doesn't. The above is to test if the issue is a result of something in ~/.bashrc or ~/.bash_profile.

best ... khay
Back to top
View user's profile Send private message
chi86
Apprentice
Apprentice


Joined: 30 Jul 2013
Posts: 184
Location: Austria

PostPosted: Thu Oct 15, 2015 5:12 am    Post subject: Reply with quote

khayyam wrote:
The above is to test if the issue is a result of something in ~/.bashrc or ~/.bash_profile.


I tried that and it can log in without any problems (as normal and super user)!

BTW thanks for your help. It is greatly appreciated!
Back to top
View user's profile Send private message
chi86
Apprentice
Apprentice


Joined: 30 Jul 2013
Posts: 184
Location: Austria

PostPosted: Thu Oct 15, 2015 7:09 am    Post subject: Reply with quote

I solved the issue!

The libedit flag had to be added to net-misc/openssh:

/etc/portage/package.use:
Code:
# required for auto completion (tab) sftp
>=net-misc/openssh-6.9_p1-r2 libedit


and after re-emerging openssh the tab completion worked for sftp!!!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum