1

I use fish as my login terminal. I was trying to run android simulator. I already edited my bash profile so I switched to bash by typing bash. I restarted my terminal after I logged off my computer and whenever I type anything I get an error.

Command: cd Desktop/

Response:

fish: Unknown command: __fish_pwd
/usr/local/share/fish/functions/fish_title.fish (line 1):
__fish_pwd
^
in command substitution
    called on line 4 of file /usr/local/share/fish/functions/fish_title.fish
in function 'fish_title' with arguments 'cd\ Desktop/'
in command substitution
/usr/local/share/fish/functions/fish_title.fish: Unknown error while evaluating command substitution
in function 'fish_title' with arguments 'cd\ Desktop/'
in command substitution
fish: Unknown command: basename
~/.config/fish/functions/fish_prompt.fish (line 1):
basename (prompt_pwd)
^
in command substitution
    called on line 74 of file ~/.config/fish/functions/fish_prompt.fish
in function 'fish_prompt'
in command substitution
~/.config/fish/functions/fish_prompt.fish: Unknown error while evaluating command substitution
in function 'fish_prompt'
in command substitution
fish: Unknown command: __fish_pwd
/usr/local/share/fish/functions/fish_title.fish (line 1):
__fish_pwd
^
in command substitution
    called on line 4 of file /usr/local/share/fish/functions/fish_title.fish
in function 'fish_title'
in command substitution
/usr/local/share/fish/functions/fish_title.fish: Unknown error while evaluating command substitution
in function 'fish_title'
in command substitution

I would like to go back to Fish login shell with no errors. Any help would be appreciated.

7
  • fish is not a terminal but a shell. Does "I use fish as my terminal." mean that you configured fish as your login shell? What exactly means "I typed bash, restarted my terminal"? Please edit your question and add clarification and more details.
    – Bodo
    Sep 19, 2020 at 8:30
  • 1
    You are using a Bash shell with a Fish profile. You need to source a Bash profile. The errors happen every time it tries to put up a prompt. in function **'fish_prompt'** in command substitution ~/.config/fish/functions/fish_prompt.fish: Unknown error while evaluating command substitution Sep 19, 2020 at 9:01
  • I have edited my question. I hope that it is clear now.
    – Henry
    Sep 19, 2020 at 9:14
  • Not being able to find basename is more troubling. What does type fish_prompt show. you? Sep 19, 2020 at 16:44
  • type fish_prompt fish: Unknown command: __fish_pwd /usr/local/share/fish/functions/fish_title.fish (line 1): __fish_pwd ^ in command substitution called on line 4 of file /usr/local/share/fish/functions/fish_title.fish in function 'fish_title' with arguments 'type\ fish_prompt' in command substitution /usr/local/share/fish/functions/fish_title.fish: Unknown error while evaluating command substitution in function 'fish_title' with arguments 'type\ fish_prompt' in command substitution fish_prompt is a function with definition # Defined in ...
    – Henry
    Sep 20, 2020 at 4:00

1 Answer 1

1

For some reason, your fish_title function can't find the function for __fish_pwd. It's a strange little function:

$ type __fish_pwd
__fish_pwd is a function with definition
# Defined in /usr/local/Cellar/fish/3.1.2/share/fish/functions/__fish_pwd.fish @ line 7
function __fish_pwd --description 'Show current path'
            pwd
end

You can always add that to your own ~/.config/fish/functions/ directory.

1
  • I added that to the functions directory. Now when I typed fish from the bash shell I get Welcome to fish, the friendly interactive shell Type help for instructions on how to use fish fish: Unknown command: basename ~/.config/fish/functions/fish_prompt.fish (line 1): basename (prompt_pwd) ^ in command substitution called on line 74 of file ~/.config/fish/functions/fish_prompt.fish in function 'fish_prompt' in command substitution ~/.config/fish/functions/fish_prompt.fish: Unknown error while evaluating command substitution in function 'fish_prompt' in command substitution
    – Henry
    Sep 20, 2020 at 4:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .