Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
9a9e6e92
Commit
9a9e6e92
authored
Jul 16, 2013
by
Trae Robrock
Browse files
No cat, and hide errors for missing cache file
parent
00ccee1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/knife_ssh/knife_ssh.plugin.zsh
View file @
9a9e6e92
function
knife_ssh
()
{
function
knife_ssh
()
{
grep
-q
$1
~/.knife_comp~
||
rm
-f
~/.knife_comp~
;
grep
-q
$1
~/.knife_comp~
2> /dev/null
||
rm
-f
~/.knife_comp~
;
ssh
$(
knife node show
$1
|
awk
'/IP:/{print $2}'
)
ssh
$(
knife node show
$1
|
awk
'/IP:/{print $2}'
)
}
}
...
@@ -9,7 +9,7 @@ _knife_ssh() {
...
@@ -9,7 +9,7 @@ _knife_ssh() {
echo
"
\n
Generating ~/.knife_comp~..."
>
/dev/stderr
echo
"
\n
Generating ~/.knife_comp~..."
>
/dev/stderr
knife node list
>
~/.knife_comp~
knife node list
>
~/.knife_comp~
fi
fi
compadd
`
cat
~/.knife_comp~
`
compadd
$(
<
~/.knife_comp~
)
else
else
echo
"Could not find knife"
>
/dev/stderr
;
echo
"Could not find knife"
>
/dev/stderr
;
fi
fi
...
...
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