Skip to content

Commit

Permalink
Shell based completion path selection
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Yu committed Aug 20, 2018
1 parent 54a7d41 commit 64f7321
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion install.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,15 @@ def copy_completion_scripts(dest_dir):
print dest_bin_dir

if completion_path:
print "You may also want to source the relevant completion script from:"
print
print "You may also want to source the",

shell = os.getenv('SHELL')
if shell:
ext = "csh" if "csh" in shell else "sh" # Basic selection logic
print "completion script (for {0}):".format(shell)
print "source {0}/complete.{1}".format(completion_path, ext)
else:
print "relevant completion script from:"
print completion_path
print

0 comments on commit 64f7321

Please sign in to comment.