Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error test: Missing argument at index 2 with virtualfish #17

Closed
edouard-lopez opened this issue Feb 10, 2016 · 4 comments
Closed

Error test: Missing argument at index 2 with virtualfish #17

edouard-lopez opened this issue Feb 10, 2016 · 4 comments
Labels
🐛 bug something that doesn't works as expected 🙏 help wanted needs PR or help on decision

Comments

@edouard-lopez
Copy link
Member

After installing virtualfish and customizing my fish_prompt as shown in the documentation with my omf theme pure I got error:

test: Missing argument at index 2

I tried with another theme (flash) and got event more error.

steps

I edited the fish_prompt as follow:

funced fish_prompt
# add lines, then save and quit vim
funcsave fish_prompt
# Ctrl+D to quit tmux tab
# open new tab, get the error

Question

How can I solve this issue?

See also

@scorphus
Copy link

@edouard-lopez: there are other themes that support virtualfish, such as bobthefish and scorphish. If you wish to have current active virtualenv in your pure prompt, just make it look like this.

@rafaelrinaldi: even this being a port from a ZSH theme, maybe you'd like to add support to virtualfish, a pull request is on the way 😄

@rafaelrinaldi
Copy link
Collaborator

@scorphus We want to stay consistent with the original theme. You can add to your custom settings anyway.

@rafaelrinaldi rafaelrinaldi added 🐛 bug something that doesn't works as expected help wanted labels Feb 11, 2016
@rafaelrinaldi
Copy link
Collaborator

@edouard-lopez Isn't there a way to simply bypass this check? Not sure how to do it but ideally the theme shouldn't bitch about it.

edouard-lopez pushed a commit to edouard-lopez/dotfiles that referenced this issue Feb 11, 2016
Error test: Missing argument at index 2 with virtualfish #17
pure-fish/pure#17
@edouard-lopez
Copy link
Member Author

Solved by editing ~/.config/fish/functions/fish_prompt.fish and adding the following:

  if set -q VIRTUAL_ENV
    set prompt $prompt "$color_gray("(basename "$VIRTUAL_ENV")")$color_normal \n"
  end

Seem the funced fish_prompt was not the correct way to do it.

However this is not reinstall-proof…

@edouard-lopez edouard-lopez added 🙏 help wanted needs PR or help on decision and removed help wanted labels Dec 12, 2018
edouard-lopez added a commit to edouard-lopez/dotfiles that referenced this issue Feb 20, 2024
Error test: Missing argument at index 2 with virtualfish #17
pure-fish/pure#17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug something that doesn't works as expected 🙏 help wanted needs PR or help on decision
Projects
None yet
Development

No branches or pull requests

3 participants