Bug 772377 - bashcompletion for the ssh family doesn't auto identify ssh identity-files
Summary: bashcompletion for the ssh family doesn't auto identify ssh identity-files
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: bash-completion
Version: 16
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-07 05:29 UTC by Daniel Black
Modified: 2012-01-13 20:56 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-01-13 20:56:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch against /usr/share/bash-completion/ssh (2.74 KB, patch)
2012-01-07 05:29 UTC, Daniel Black
no flags Details | Diff

Description Daniel Black 2012-01-07 05:29:03 UTC
Created attachment 551337 [details]
patch against /usr/share/bash-completion/ssh

There's no ssh-add bash completion.

ssh -i {tab} , sftp -i {tab} etc.. gives any old file.

Version-Release number of selected component (if applicable):

Name        : bash-completion
Arch        : noarch
Epoch       : 1
Version     : 1.3
Release     : 6.fc16
Size        : 576 k
Repo        : installed
From repo   : Fedora 16 - x86_64

patch gives this functionality

Comment 1 Ville Skyttä 2012-01-07 07:55:33 UTC
I've added a simple ssh-add completion upstream.

Regarding the rest of the patch, here's some comments:

This is something that should really be submitted upstream.  If you like, I can do that for you, but I believe efore it will be accepted upstream, there are some things that should be addressed:

- Drop the unimplemented _ssh_pkcs11 stuff
- Observe coding style, initialization, indentation etc of existing completions
- Non-local "match" variable leak from _ssh_identity_files
- Unportable use of grep: -m is definitely unportable, and some grep versions
  don't even have -E.
- Should offer also IdentityFiles from ssh's configs (non-blocker).

Additionally, a lot of things have changed since version 1.3 of bash-completion; rawhide has 1.90 but patches submitted upstream should be done against upstream git:

http://bash-completion.alioth.debian.org/

See also CONTRIBUTING in
http://anonscm.debian.org/gitweb/?p=bash-completion/bash-completion.git;a=blob;f=README

Comment 2 Daniel Black 2012-01-09 01:35:41 UTC
upstream patch done; https://github.com/grooverdan/bash-completion/tree/ssh-identityfile

Comment 3 Ville Skyttä 2012-01-13 20:56:13 UTC
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=313507&group_id=100114

Thanks, closing here as upstream.


Note You need to log in before you can comment on or make changes to this bug.