Pre-command
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by examining how Asynctasks handles the existing command= setting and launches tasks in the Vim plugin. Compare that flow with the direnv-triggering cd $(VIM_ROOT) example and determine how a one-time pre-command should be configured and sequenced. Done means the requested pre-command runs before command= without breaking existing task definitions.
Written by the indexing model from the issue text.
Description
Is it possible to have a pre-command.
For example, if you run for the first time, then it sets up some variable or something (in my case, i want to use direnv).
So, it takes about 5 seconds to setup direnv and while it sets up it outputs. So i was wondering if i can use a pre-cmd so that it sets it up.
The way i do now is:
command= cd .. && cd $(VIM_ROOT) && cargo run
So basically, i go a dir up, then back to activate direnv. Because direnv is activated only on directory change (it acts as a bash/zsh daemon from .bashrc/.zshrc file). And since Asynctasks always opens in the same directory where VIM is open (or project root directory), direnv can't detect the dir change, thus the cd $(VIM_ROOT) of Asynctasks does not activate direnv.
Having a pre-cmd would be very useful not only for direnv, but other cases too.
my case would be:
pre-command= cd .. && cd $(VIM_ROOT) # to be activated only once
command= cargo run # to ba activated everytime
- Dominant language
- Vim Script
- Stars
- 934
- Forks
- 32
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from skywind3000/asynctasks.vim
-
macro 能否嵌套Open
Difficulty 3/5 1-2 days Newbie friendliness 55/100
skywind3000/asynctasks.vim#124 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
skywind3000/asynctasks.vim#122 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
skywind3000/asynctasks.vim#117 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
skywind3000/asynctasks.vim#107 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
skywind3000/asynctasks.vim#106 ·
All issues in skywind3000/asynctasks.vim
Similar issues
-
0.2.1-rc.3 compatibility: 21 peer ranges enumerate exact versions, so rc.3 is rejectedPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
NanmiCoder/dsh-agent-teams#277 ·
Maintainers usually reply within 1 day
-
random_elements(unique=True) on an OrderedDict: ZeroDivisionError once only zero weights remain, AssertionError with use_weighting=FalsePossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 13 days
-
Validate CI command vectors before indexing Cargo subcommandsPossibly taken @amandeavor claimed this today. Openbug ci good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
[ordering-review] workshop order graph: 1 confirmed ordering problem, 3 cycles are false positivesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
githubnext/gh-aw-workshop#4943 · 1 comment ·
Maintainers usually reply within 1 day