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

Add terminal title codes to PS1 #143

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rpl-ian-lunam
Copy link

@rpl-ian-lunam rpl-ian-lunam commented Jul 11, 2023

Add bash terminal title codes to PS1, with setting, completion, etc.

@rpl-ian-lunam
Copy link
Author

Frequently when ssh'ing around hosts have PS1 set to update the terminal window title to reflect the current hostname and path. When using FancyGit when you come back to your local machine the title remains the last host and path you ssh'd to.

This simple addition adds the same standard terminal window title control chars to PS1, based on an enable/disable setting and includes the auto completion updates.

Screenshot from 2023-07-24 16-06-07
Screenshot from 2023-07-24 16-06-22

@rpl-ian-lunam
Copy link
Author

Contains four simple commands:

  • --enable-term-title-host
  • --disable-term-title-host
  • --enable-term-title-path
  • --disable-term-title-path

Depending on config, will add the hostname and/or path to the title bar of the terminal window using the escape commands. If both are disabled, clears the title - in standard Gnome terminal it displays "Terminal"

@rpl-ian-lunam
Copy link
Author

rpl-ian-lunam commented Jul 24, 2023

Screenshot from 2023-07-25 10-38-55
Screenshot from 2023-07-25 10-39-27
Screenshot from 2023-07-25 10-39-49
Screenshot from 2023-07-25 10-40-15
Screenshot from 2023-07-25 10-40-34

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

Successfully merging this pull request may close these issues.

None yet

1 participant