Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
fc3a3c72
Commit
fc3a3c72
authored
Nov 08, 2009
by
Robby Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only using the contents of .ssh/known_hosts when the file exists for ssh/scp…
Only using the contents of .ssh/known_hosts when the file exists for ssh/scp auto-completion. Closes issue #20
parent
eb05b614
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
completion.zsh
lib/completion.zsh
+7
-2
No files found.
lib/completion.zsh
View file @
fc3a3c72
...
...
@@ -22,7 +22,7 @@ else
fi
zstyle
':completion:*'
list-colors
''
zstyle
':completion:*'
hosts
$(
sed
's/[, ].*$//'
$HOME
/.ssh/known_hosts
)
unsetopt MENU_COMPLETE
#setopt AUTO_MENU
...
...
@@ -35,7 +35,12 @@ zstyle ':completion:*:*:*:*:*' menu yes select
zstyle
':completion:*:*:kill:*:processes'
list-colors
'=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
zstyle
':completion:*:*:*:*:processes'
command
"ps -u
`
whoami
`
-o pid,user,comm -w -w"
zstyle
':completion:*:*:(ssh|scp):*:*'
hosts
`
sed
's/^\([^ ,]*\).*$/\1/'
~/.ssh/known_hosts
`
# Load known hosts file for auto-completion with ssh and scp commands
if
[
-f
~/.ssh/known_hosts
]
;
then
zstyle
':completion:*'
hosts
$(
sed
's/[, ].*$//'
$HOME
/.ssh/known_hosts
)
zstyle
':completion:*:*:(ssh|scp):*:*'
hosts
`
sed
's/^\([^ ,]*\).*$/\1/'
~/.ssh/known_hosts
`
fi
# Complete on history
# zstyle ':completion:*:history-words' stop yes
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment