From dongcarl at fastmail.com Mon Jul 13 07:39:08 2015 From: dongcarl at fastmail.com (Carl Dong) Date: Sun, 12 Jul 2015 23:39:08 -0700 Subject: [ocaml-infra] Question about Opam and Fish shell Message-ID: <1436769548.612887.322039137.0BB07080@webmail.messagingengine.com> Does anyone know why opam doesn't just add `eval (opam config env)` to the shell config but adds `. /home/dongcarl/.opam/opam-init/init.fish > /dev/null 2> /dev/null or true`? In fish shell the longer one doesn't work and wreaks havoc. I have to manually change the config file to remove the longer line and add the shorter line each time I install opam and it's super annoying. Cheers, Carl Dong dongcarl at fastmail.com "I fight for the users" From daniel.buenzli at erratique.ch Mon Jul 13 10:59:54 2015 From: daniel.buenzli at erratique.ch (=?utf-8?Q?Daniel_B=C3=BCnzli?=) Date: Mon, 13 Jul 2015 10:59:54 +0100 Subject: [ocaml-infra] Question about Opam and Fish shell In-Reply-To: <1436769548.612887.322039137.0BB07080@webmail.messagingengine.com> References: <1436769548.612887.322039137.0BB07080@webmail.messagingengine.com> Message-ID: <14F8919E0E6E46419A54BD52545313F5@erratique.ch> Le lundi, 13 juillet 2015 ? 07:39, Carl Dong a ?crit : > Does anyone know why opam doesn't just add `eval (opam config env)` to > the shell config but adds `. /home/dongcarl/.opam/opam-init/init.fish > > /dev/null 2> /dev/null or true`? I guess it's to avoid opam being called each time you create a new shell. > In fish shell the longer one doesn't work and wreaks havoc. Can you help us to figure out what wreaks havoc exactly so that this can be fixed. It seems that the fish script simply sources the variables.fish script located in opam-init do you see anything wrong there ? Best, Daniel From daniel.buenzli at erratique.ch Mon Jul 13 11:22:07 2015 From: daniel.buenzli at erratique.ch (=?utf-8?Q?Daniel_B=C3=BCnzli?=) Date: Mon, 13 Jul 2015 11:22:07 +0100 Subject: [ocaml-infra] Question about Opam and Fish shell In-Reply-To: <1436782322.2124096.322170329.3A57FB7D@webmail.messagingengine.com> References: <1436769548.612887.322039137.0BB07080@webmail.messagingengine.com> <14F8919E0E6E46419A54BD52545313F5@erratique.ch> <1436782322.2124096.322170329.3A57FB7D@webmail.messagingengine.com> Message-ID: <8EC403C32FCC4D729BC9E083956E2235@erratique.ch> Le lundi, 13 juillet 2015 ? 11:12, Carl Dong a ?crit : > Which file should I edit to send in a pull request? https://github.com/ocaml/opam/search?utf8=%E2%9C%93&q=fish Gives a few hints. Best, Daniel From dongcarl at fastmail.com Mon Jul 13 11:12:02 2015 From: dongcarl at fastmail.com (Carl Dong) Date: Mon, 13 Jul 2015 03:12:02 -0700 Subject: [ocaml-infra] Question about Opam and Fish shell In-Reply-To: <14F8919E0E6E46419A54BD52545313F5@erratique.ch> References: <1436769548.612887.322039137.0BB07080@webmail.messagingengine.com> <14F8919E0E6E46419A54BD52545313F5@erratique.ch> Message-ID: <1436782322.2124096.322170329.3A57FB7D@webmail.messagingengine.com> I just talked to Zanchey the mod for #fish IRC channel. He fixed it by removing the double quotes around $PATH in line 1 of variables.fish... He said the colon turns PATH into a two-element array He also said that in fish 2.2, you need a semicolon before the "or true" in config.fish and init.fish, otherwise "it just gets ignored" (not sure what gets ignored exactly. (the semicolon works in versions before 2.2 as well) Which file should I edit to send in a pull request? Cheers, Carl Dong dongcarl at fastmail.com "I fight for the users" On Mon, Jul 13, 2015, at 02:59 AM, Daniel B?nzli wrote: > Le lundi, 13 juillet 2015 ? 07:39, Carl Dong a ?crit : > > Does anyone know why opam doesn't just add `eval (opam config env)` to > > the shell config but adds `. /home/dongcarl/.opam/opam-init/init.fish > > > /dev/null 2> /dev/null or true`? > > I guess it's to avoid opam being called each time you create a new shell. > > > > In fish shell the longer one doesn't work and wreaks havoc. > > Can you help us to figure out what wreaks havoc exactly so that this can > be fixed. It seems that the fish script simply sources the variables.fish > script located in opam-init do you see anything wrong there ? > > Best, > > Daniel > >