Can't recognized root directory when use terminal to output
Hello! It's a nice vim plugin and I get a lot of benefit from it! But I meet a problem that I can't change to my root directory on terminal output mode. Here is my project tree.
.
├── .root
├── src
│ └── 1.cpp
└── .tasks
When I open 1.cpp in src directory, and run asynctasks configured like that:
[file-build]
command=pwd
cwd=$(VIM_ROOT)
output=terminal
It shows
/home/qsdrqs/test/src
[Process exited 0]
When I change output into quickfix, it shows
|| [pwd]
|| /home/qsdrqs/test
|| [Finished in 0 seconds]
In a word, the "terminal" mode may not works well in changing directory.
I can't reproduce your problem, could you diagnose this with:
:echo asyncrun#get_root('%')
And see if the output is correct.
I can't reproduce your problem, could you diagnose this with:
:echo asyncrun#get_root('%')And see if the output is correct.
Yes, it is correct.
I make some steps to reproduce this problem, at least it works for me.
- create a directory called
testand cd into it - create a empty file
.root - create a directory called
srcand cd into it - create a file called 1.c and use vim to edit it.
- config vimrc file as below:
Plug 'skywind3000/asynctasks.vim'
Plug 'skywind3000/asyncrun.vim'
let g:asyncrun_open = 7
let g:asynctasks_confirm=0
let g:asynctasks_term_pos = 'bottom'
let g:asynctasks_term_rows = 14
6.use
:AsyncTaskEdit
to edit .task file (which is correctly at the ".root" position)
[file-build]
command=pwd
cwd=$(VIM_ROOT)
output=terminal
save it. 7.use
:AsyncTask file-build
then it shows
/home/qsdrqs/test/src
[Process exited 0]
I have noticed that when I config
let g:asynctasks_term_pos
as quickfix , vim , tab and external it just works well. But when I set it as top , bottom , left and right , it shows the wrong directory.
what is your vim version number ?? operating system ??
what is your vim version number ?? operating system ??
My vim version is 8.2, OS is archlinux and kernel version is 5.7.2
I noticed a trick that if I add cd $(VIM_ROOT) before pwd and the :AsyncTask file-build will show the correct result.