Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shell based completion path selection #521

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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