dvc icon indicating copy to clipboard operation
dvc copied to clipboard

[RFC] Use `--no-config` option in fish > 3.3

Open UnderTheCarpet opened this issue 3 years ago • 6 comments

This is a first draft of fixing #1307. However, I am quite unhappy about it.

Because only fish version > 3.3 supports the --no-config option, it cannot be applied without checking first. Thus, I am running the shell and parse the $shellname_VERSION variable.

I went that way, because the $FISH_VERSION does not seem to be available in the dvc process context. Also, it is not guaranteed that dvc itself is run with $SHELL itself, is it?

I do not think, this is a great solution and would like some input. Does somebody have a better idea?


Thank you for the contribution - we'll try to review it as soon as possible. 🙏

UnderTheCarpet avatar Aug 06 '22 15:08 UnderTheCarpet

Perhaps adding a config flag to dvc to manually enabling fish's --no-config option would be a cleaner solution.

UnderTheCarpet avatar Aug 07 '22 05:08 UnderTheCarpet

@clamydo When is $FISH_VERSION available? We should be able to get it if you run dvc from fish.

efiop avatar Aug 07 '22 19:08 efiop

When is $FISH_VERSION available? We should be able to get it if you run dvc from fish. I thought so too, however it is a somewhat magic unexported variable.

Also ZSH_VERSION and BASH_VERSION seem to be behave identical, i.e., unexported.

UnderTheCarpet avatar Aug 07 '22 19:08 UnderTheCarpet

@clamydo Hey, any plans to continue working on this?

efiop avatar Aug 28 '22 22:08 efiop

@clamydo Hey, any plans to continue working on this?

Hey @efiop, in principle yes. It's just my time is stretched thin, so expect slow progress. Sorry for letting you wait.

I also wouldn't mind, if someone else would take over.

UnderTheCarpet avatar Aug 30 '22 06:08 UnderTheCarpet

@clamydo, could you please elaborate on what's missing/left here to do? It'd be easier for someone to take over.


Overall, the code looks good to me, but looking at it, it feels that the shell setup does not belong here at all, and we are mixing shell-setup/task-monitor/cache-restore, etc. in a place where the only thing it should be doing is "run" the script.

Also shell setup is a one time thing. I think what we eventually need is something like this (not suggesting to do this right now, just something to keep in mind).

skshetry avatar Sep 01 '22 15:09 skshetry

Closing as stale

efiop avatar Nov 07 '22 20:11 efiop