[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#805270: opam's integration with fish shell broken



Package: opam
Version: 1.2.2-3+b1
Severity: normal
Tags: upstream

Dear Maintainer,

If you let 'opam init' modify config.fish when running the fish shell
it will break $PATH etc. See below for steps to reproduce.


This has already been reported and fixed upstream, see:
https://github.com/ocaml/opam/issues/2244
https://github.com/ocaml/opam/issues/2165

The latter issue contains the relevant patches.


Steps to reproduce:

> fish
> opam init
[...]
Do you want OPAM to modify ~/.config/fish/config.fish and ~/.ocamlinit
(default is 'no', use 'f' to name a file other than ~/.config/fish/config.fish)
[N/y/f] y
> fish  # Start a new fish shell
fish: Unknown command 'uname'
/usr/share/fish/functions/__fish_pwd.fish (line 1): uname
                                                    ^
in command substitution
	called on line -1 of file /usr/share/fish/functions/__fish_pwd.fish

from sourcing file /usr/share/fish/functions/__fish_pwd.fish
	called on standard input

in command substitution
	called on standard input

in command substitution
	called on standard input

switch: Expected exactly one argument, got 0

/usr/share/fish/functions/__fish_pwd.fish (line 1): switch (uname)
                                                           ^
from sourcing file /usr/share/fish/functions/__fish_pwd.fish
	called on standard input

in command substitution
	called on standard input

in command substitution
	called on standard input

fish: Unknown command '__fish_pwd'
fish: echo $_ " "; __fish_pwd
                   ^
in command substitution
	called on standard input

/usr/share/fish/functions/type.fish (line 1): seq (count $argv)
                                              ^
in command substitution
	called on line 2 of file /usr/share/fish/functions/type.fish

in function “type”
	called on standard input
	with parameter list “-q -p command-not-found”

in function “__fish_command_not_found_setup”
	called on line 6 of file /usr/share/fish/functions/fish_prompt.fish
	with parameter list “hostname”

in event handler: handler for generic event “fish_command_not_found”

/usr/share/fish/functions/type.fish (line 1): seq (count $argv)
                                              ^
in command substitution
	called on line 2 of file /usr/share/fish/functions/type.fish

in function “type”
	called on standard input
	with parameter list “-p -q pkgfile”

in function “__fish_command_not_found_setup”
	called on line 6 of file /usr/share/fish/functions/fish_prompt.fish
	with parameter list “hostname”

in event handler: handler for generic event “fish_command_not_found”

fish: Unknown command 'hostname'
/usr/share/fish/functions/fish_prompt.fish (line 1): hostname|cut -d . -f 1
                                                     ^
in command substitution
	called on line 4 of file /usr/share/fish/functions/fish_prompt.fish

in function “fish_prompt”
	called on standard input

in command substitution
	called on standard input

fish: Unknown command 'uname'
/usr/share/fish/functions/prompt_pwd.fish (line 1): uname
                                                    ^
in command substitution
	called on line -1 of file /usr/share/fish/functions/prompt_pwd.fish

from sourcing file /usr/share/fish/functions/prompt_pwd.fish
	called on line 6 of file /usr/share/fish/functions/fish_prompt.fish

in command substitution
	called on line 4 of file /usr/share/fish/functions/fish_prompt.fish

in command substitution
	called on line 4 of file /usr/share/fish/functions/fish_prompt.fish

in function “fish_prompt”
	called on standard input

in command substitution
	called on standard input

switch: Expected exactly one argument, got 0

/usr/share/fish/functions/prompt_pwd.fish (line 3): switch (uname)
                                                           ^
from sourcing file /usr/share/fish/functions/prompt_pwd.fish
	called on line 6 of file /usr/share/fish/functions/fish_prompt.fish

in command substitution
	called on line 4 of file /usr/share/fish/functions/fish_prompt.fish

in command substitution
	called on line 4 of file /usr/share/fish/functions/fish_prompt.fish

in function “fish_prompt”
	called on standard input

in command substitution
	called on standard input

fish: Unknown command 'sed'
/usr/share/fish/functions/prompt_pwd.fish (line 2): 	echo $PWD | sed -e "s|^$realhome|~|" $args_pre -e 's-\([^/.]\)[^/]*/-\1/-g' $args_post
                                                    	            ^
in function “prompt_pwd”
	called on line 6 of file /usr/share/fish/functions/fish_prompt.fish

in command substitution
	called on line 4 of file /usr/share/fish/functions/fish_prompt.fish

in function “fish_prompt”
	called on standard input

in command substitution
	called on standard input

fish: Unknown command '__fish_pwd'
fish: echo $_ " "; __fish_pwd
                   ^
in command substitution
	called on standard input

fish: Unknown command '__fish_pwd'
fish: echo $_ " "; __fish_pwd
                   ^
in command substitution
	called on standard input

fish: Unknown command 'seq'
in command substitution
	called on line 2 of file /usr/share/fish/functions/type.fish

in function “type”
	called on line 28 of file /usr/share/fish/functions/help.fish
	with parameter list “-q ”

in function “help”
	called on standard input

fish: Unknown command 'seq'
in command substitution
	called on line 2 of file /usr/share/fish/functions/type.fish

in function “type”
	called on line 39 of file /usr/share/fish/functions/help.fish
	with parameter list “-q -f htmlview”

in function “help”
	called on standard input

fish: Unknown command 'seq'
in command substitution
	called on line 2 of file /usr/share/fish/functions/type.fish

in function “type”
	called on line 39 of file /usr/share/fish/functions/help.fish
	with parameter list “-q -f www-browser”

in function “help”
	called on standard input

fish: Unknown command 'seq'
in command substitution
	called on line 2 of file /usr/share/fish/functions/type.fish

in function “type”
	called on line 39 of file /usr/share/fish/functions/help.fish
	with parameter list “-q -f links”

in function “help”
	called on standard input

fish: Unknown command 'seq'
in command substitution
	called on line 2 of file /usr/share/fish/functions/type.fish

in function “type”
	called on line 39 of file /usr/share/fish/functions/help.fish
	with parameter list “-q -f elinks”

in function “help”
	called on standard input

fish: Unknown command 'seq'
in command substitution
	called on line 2 of file /usr/share/fish/functions/type.fish

in function “type”
	called on line 39 of file /usr/share/fish/functions/help.fish
	with parameter list “-q -f lynx”

in function “help”
	called on standard input

fish: Unknown command 'seq'
in command substitution
	called on line 2 of file /usr/share/fish/functions/type.fish

in function “type”
	called on line 39 of file /usr/share/fish/functions/help.fish
	with parameter list “-q -f w3m”

in function “help”
	called on standard input

fish: Unknown command 'seq'
in command substitution
	called on line 2 of file /usr/share/fish/functions/type.fish

in function “type”
	called on line 58 of file /usr/share/fish/functions/help.fish
	with parameter list “-q cygstart”

in function “help”
	called on standard input

fish: Unknown command 'seq'
in command substitution
	called on line 2 of file /usr/share/fish/functions/type.fish

in function “type”
	called on line 61 of file /usr/share/fish/functions/help.fish
	with parameter list “-q xdg-open”

in function “help”
	called on standard input

fish: Unknown command 'uname'
in command substitution
	called on line 1 of file /usr/share/fish/functions/help.fish

in function “help”
	called on standard input

test: Missing argument at index 2
fish: Unknown command 'which'
/usr/share/fish/functions/_.fish (line 1): which gettext ^/dev/null
                                           ^
in command substitution
	called on line -1 of file /usr/share/fish/functions/_.fish

from sourcing file /usr/share/fish/functions/_.fish
	called on line 3 of file /usr/share/fish/functions/help.fish

in command substitution
	called on line 1 of file /usr/share/fish/functions/help.fish

in command substitution
	called on line 1 of file /usr/share/fish/functions/help.fish

in function “help”
	called on standard input

fish: Unknown command 'sed'
/usr/share/fish/functions/prompt_pwd.fish (line 2): 	echo $PWD | sed -e "s|^$realhome|~|" $args_pre -e 's-\([^/.]\)[^/]*/-\1/-g' $args_post
                                                    	            ^
in function “prompt_pwd”
	called on line 6 of file /usr/share/fish/functions/fish_prompt.fish

in command substitution
	called on line 4 of file /usr/share/fish/functions/fish_prompt.fish

in function “fish_prompt”
	called on standard input

in command substitution
	called on standard input

fish: Unknown command '__fish_pwd'
fish: echo $_ " "; __fish_pwd
                   ^
in command substitution
	called on standard input

fish: Unknown command '__fish_pwd'
fish: echo $_ " "; __fish_pwd
                   ^
in command substitution
	called on standard input

fish: Unknown command 'ls'
/usr/share/fish/functions/ls.fish (line 5): if command ls --version 1>/dev/null 2>/dev/null
                                                       ^
from sourcing file /usr/share/fish/functions/ls.fish
	called on standard input

in command substitution
	called on standard input

fish: Unknown command 'ls'
/usr/share/fish/functions/ls.fish (line 31): 	if command ls -G / 1>/dev/null 2>/dev/null
                                             	           ^
from sourcing file /usr/share/fish/functions/ls.fish
	called on standard input

in command substitution
	called on standard input

fish: Unknown command 'ls'
fish: Unknown command 'sed'
/usr/share/fish/functions/prompt_pwd.fish (line 2): 	echo $PWD | sed -e "s|^$realhome|~|" $args_pre -e 's-\([^/.]\)[^/]*/-\1/-g' $args_post
                                                    	            ^
in function “prompt_pwd”
	called on line 6 of file /usr/share/fish/functions/fish_prompt.fish

in command substitution
	called on line 4 of file /usr/share/fish/functions/fish_prompt.fish

in function “fish_prompt”
	called on standard input

in command substitution
	called on standard input

fish: Unknown command '__fish_pwd'
fish: echo $_ " "; __fish_pwd
                   ^
in command substitution
	called on standard input



-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.2.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

Versions of packages opam depends on:
ii  build-essential  12.1
ii  curl             7.45.0-1+b1
ii  libbz2-1.0       1.0.6-8
ii  libc6            2.19-22
ii  opam-docs        1.2.2-3
ii  tar              1.28-2.1
ii  unzip            6.0-20
ii  wget             1.16.3-3
ii  zlib1g           1:1.2.8.dfsg-2+b1

Versions of packages opam recommends:
ii  aspcud     1:1.9.1-2
ii  darcs      2.10.1-4
ii  git        1:2.6.2-1
ii  mercurial  3.6-1
ii  ocaml      4.02.3-5
ii  rsync      3.1.1-3

opam suggests no packages.

-- no debconf information


Reply to: