From d124436d94a1e502f7f31a6958d01a513c8cb1a5 Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Wed, 4 Feb 2015 13:37:34 -0500 Subject: Adding [tab] completion for bash and zsh. --- bin/ossh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'bin/ossh') 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: -- cgit v1.2.3