mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-02-18 04:42:50 +08:00
only output the git project directory
This commit is contained in:
parent
858db70ab8
commit
2b5f3de4b6
|
@ -10,7 +10,7 @@ endif
|
|||
|
||||
function! airline#extensions#projectdir#Dir() abort
|
||||
let dir = FugitiveGitDir(bufnr(''))
|
||||
return empty(dir) ? '' : pathshorten(simplify(dir .. '/../'))
|
||||
return empty(dir) ? '' : pathshorten(fnamemodify(simplify(dir .. '/../'), ':h:t'))
|
||||
endfunction
|
||||
|
||||
function! airline#extensions#projectdir#init(ext) abort
|
||||
|
|
Loading…
Reference in New Issue
Block a user