aboutsummaryrefslogtreecommitdiff
path: root/lua/luatab/init.lua
diff options
context:
space:
mode:
authorAlvaro Sevilla <alvarosevilla95@gmail.com>2021-07-13 19:48:24 +0200
committerGitHub <noreply@github.com>2021-07-13 19:48:24 +0200
commitfe379762460d0b0e24dddafbc9cd93752544a06d (patch)
treecb7612f8db51a7a9af800c4a2a46334dceb19e10 /lua/luatab/init.lua
parent540362f44bc17ae8101828eec00fd00ffc4148bb (diff)
parent4aa9bebdb4007428cfca4ffd22e42f08e2cc88ec (diff)
downloadminitab.nvim-fe379762460d0b0e24dddafbc9cd93752544a06d.tar.xz
minitab.nvim-fe379762460d0b0e24dddafbc9cd93752544a06d.zip
Merge pull request #5 from mxdevmanuel/master
feat: Change README documentation to set tabline and terminal command
Diffstat (limited to 'lua/luatab/init.lua')
-rw-r--r--lua/luatab/init.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/lua/luatab/init.lua b/lua/luatab/init.lua
index 597af3a..5e419c2 100644
--- a/lua/luatab/init.lua
+++ b/lua/luatab/init.lua
@@ -11,7 +11,8 @@ local function tabName(bufnr)
elseif file:sub(file:len()-2, file:len()) == 'FZF' then
return 'FZF'
elseif buftype == 'terminal' then
- return 'zsh'
+ _, mtch = string.match(file, "term:(.*):(%a+)")
+ return mtch ~= nil and mtch or 'zsh'
elseif file == '' then
return '[No Name]'
end