From 01675eb8fea5995d9777133ae789785b4be0aa95 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Thu, 22 Feb 2024 17:08:10 +0100 Subject: [PATCH] update prompt format nvim --- .config/nvim/lua/funcs.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.config/nvim/lua/funcs.lua b/.config/nvim/lua/funcs.lua index cd892003..8ac6e694 100644 --- a/.config/nvim/lua/funcs.lua +++ b/.config/nvim/lua/funcs.lua @@ -3,13 +3,9 @@ local icons = require("config.icons") function M.set_title() local title = " %t" - local f = io.popen([[zsh -c ' - source $XDG_CONFIG_HOME/zsh/configs/autogenerated/hashes - print -Pn "$USER@$HOST [%3~] " - ']]) + local f = io.popen([[ zsh -lc 'print -P $PS1' | sed 's/\[[0-9;]*m//g;s/» / %t/g' ]]) if f ~= nil then title = f:read("*a") or "" - title = title .. " %t" f:close() end vim.opt.titlestring = title