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

setting title when PROMPT_COMMAND is set #9

Open
bemurphy opened this issue Mar 31, 2013 · 2 comments
Open

setting title when PROMPT_COMMAND is set #9

bemurphy opened this issue Mar 31, 2013 · 2 comments

Comments

@bemurphy
Copy link

I might be dense on this, but I have PROMPT_COMMAND set in my ~/.bashrc for setting terminal title to the current directory.

The problem is, the prompt command runs after consular has set the title, so it overrides what consular has set. So, I put this in my project Termfile:

def set_title(context)
  run "unset PROMPT_COMMAND"
  run 'echo -e "\033];' + context[:options][:name] + '\007"'
  run "clear"
end

tab("server") do
  set_title(_context)
  run "bsa"
end

This works, but I'm looking for a hook to a better solution. If one doesn't exist and I find it I'll put in a PR. Know of anything though?

@achiurizo
Copy link
Owner

@bemurphy no I don't recall having a hook in place for this. If you do find one would love to get a PR 😺

@bemurphy
Copy link
Author

bemurphy commented Apr 1, 2013

btw, this is a TOTAL hack for now but does the job. Posting here just in case somebody hits a hangup before there's a better way:

https://gist.github.com/bemurphy/fe988660cf85431ad86a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants