1
0
Fork 0

update prompt format nvim

This commit is contained in:
Luca Bilke 2024-02-22 17:08:10 +01:00
parent 34b3e87a57
commit 01675eb8fe

View file

@ -3,13 +3,9 @@ local icons = require("config.icons")
function M.set_title() function M.set_title()
local title = " %t" local title = " %t"
local f = io.popen([[zsh -c ' local f = io.popen([[ zsh -lc 'print -P $PS1' | sed 's/\[[0-9;]*m//g;s/» / %t/g' ]])
source $XDG_CONFIG_HOME/zsh/configs/autogenerated/hashes
print -Pn "$USER@$HOST [%3~] "
']])
if f ~= nil then if f ~= nil then
title = f:read("*a") or "" title = f:read("*a") or ""
title = title .. " %t"
f:close() f:close()
end end
vim.opt.titlestring = title vim.opt.titlestring = title