summaryrefslogtreecommitdiffstats
path: root/bin/ossh
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2015-02-04 13:37:34 -0500
committerKenny Woodson <kwoodson@redhat.com>2015-02-04 13:37:34 -0500
commitd124436d94a1e502f7f31a6958d01a513c8cb1a5 (patch)
tree9e28263456524529072ff8c89034234619e1b56d /bin/ossh
parentfe7d30b762357ac4ec1fe2b173320d463267ac82 (diff)
downloadopenshift-d124436d94a1e502f7f31a6958d01a513c8cb1a5.tar.gz
openshift-d124436d94a1e502f7f31a6958d01a513c8cb1a5.tar.bz2
openshift-d124436d94a1e502f7f31a6958d01a513c8cb1a5.tar.xz
openshift-d124436d94a1e502f7f31a6958d01a513c8cb1a5.zip
Adding [tab] completion for bash and zsh.
Diffstat (limited to 'bin/ossh')
-rwxr-xr-xbin/ossh10
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/ossh b/bin/ossh
index 2fa4bde37..1cef1b4fa 100755
--- a/bin/ossh
+++ b/bin/ossh
@@ -26,6 +26,13 @@ class Ossh(object):
self.file_path = os.path.join(os.path.dirname(os.path.realpath(__file__)))
self.parse_cli_args()
+ # parse host and user
+ self.process_host()
+
+ if not self.args.list and not self.env:
+ print "Please specify an environment."
+ return
+
if self.args.host == '' and not self.args.list:
self.parser.print_help()
return
@@ -34,15 +41,12 @@ class Ossh(object):
self.host_inventory = self.get_hosts()
-
if self.args.debug:
print self.args
# get a dict of host inventory
self.get_hosts()
- # parse host and user
- self.process_host()
# perform the SSH
if self.args.list: