-
Notifications
You must be signed in to change notification settings - Fork 40
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
Full CWD path on window title #94
Comments
This is a good idea, if you can make it being configurable for any pshazz themes, pull-request is welcome. |
I achieved this with a user plugin named function pshazz:title:init {
$title = $global:pshazz.theme.title
# default
if(!$title) { $title = 'Console' }
$global:pshazz.title = $title
}
function global:pshazz:title:prompt {
$vars = $global:pshazz.prompt_vars
$vars.keys | % { set-variable $_ $vars[$_] }
$title = $executionContext.InvokeCommand.ExpandString($global:pshazz.title)
$host.ui.rawui.WindowTitle = $title
} Then in your theme, simply add the plugin to the list of plugins, and add a field for your title; something like It's especially nice with ConEmu, as this title can be shown in the "status" bar at the bottom of the window. Note: You can place user plugins in your pshazz/plugins directory. |
At the time I created this issue, I was using ConEmu with "Quake mode" enabled and window title added to status bar exactly like @Deide described: But I'm using Windows Terminal for some time now and it doesn't have a status bar yet. So I disabled this as the tab itself was not really suitable for long paths. I also noticed that I don't find myself wondering the current path so often and I kind of lost my interest in this feature. I'm not closing the issue in case this is something you want to do at some point but feel free to close it if no one is interested anymore. Thank you. |
Since the default theme displays only the current folder's name, I find it helpful to display the full path of the working directory on the window title (instead of using a theme that displays it inline with every command). Adding
$host.UI.RawUI.WindowTitle = gl
toprompt
achieves that.If you don't find this useful enough to add to pshazz, I'd appreciate any pointers about how to add this to my PS profile without overwriting pshazz.
The text was updated successfully, but these errors were encountered: