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

illegal option: --ansi troubles #691

Closed
3 of 14 tasks
effohenteee opened this issue Oct 4, 2016 · 3 comments
Closed
3 of 14 tasks

illegal option: --ansi troubles #691

effohenteee opened this issue Oct 4, 2016 · 3 comments

Comments

@effohenteee
Copy link

  • Category
    • fzf binary
    • fzf-tmux script
    • Key bindings
    • Completion
    • Vim
    • Neovim
    • Etc.
  • OS
    • Linux
    • Mac OS X
    • Windows
    • Etc.
  • Shell
    • bash
    • zsh
    • fish

Hello, first I would like to thank you for your work.

Unfortunately, I am having a bit of a problem. When I first attempted to install fzf, I received an error saying that Ruby was not installed so I installed it (Ruby version 2.3.1) and Curses (version 1.0.2) and then attempted to use the function below which I obtained from https://github.com/paulirish/dotfiles/blob/master/.functions that starts at line 34.

# git commit browser. needs fzf
log() {
  git log --graph --color=always \
      --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" |
  fzf --ansi --no-sort --reverse --tiebreak=index --toggle-sort=\` \
      --bind "ctrl-m:execute:
                echo '{}' | grep -o '[a-f0-9]\{7\}' | head -1 |
                xargs -I % sh -c 'git show --color=always % | less -R'"
}

Upon execution I receive the error that --ansi is an illegal option.

screenshot from 2016-10-03 21-22-32

screenshot from 2016-10-03 21-12-51

Steps I have tried to rectify the problem:

  • Update fzf repo with and without the depth option.
  • Downgrade Ruby from 2.3.1 to a 1.9.3 build.
  • Uninstall Ruby and Curses and install Go and attempt to build from source with instructions from here How to built from source? #300 (comment) .
  • Have both Ruby and Go installed and run the install script.

Curiously, the binaries that are generated appear to be labeled properly but the --version output is incorrect as shown below. I am not sure this is related or not.

screenshot from 2016-10-03 21-36-47
screenshot from 2016-10-03 21-45-02

Lastly, the fzf-tmux command is not working either.

My current system is running Ubuntu 16.04 and this is a fresh install from earlier today. I have made some configuration changes but I am unsure if any of those changes could have this effect on fzf's functionality. I have probably botched something but, for the life of me, I cannot figure out what I am doing incorrectly. I am happy to provide any documentation that you may need and I would appreciate any help you can provide.

@junegunn
Copy link
Owner

junegunn commented Oct 4, 2016

You don't need to care about the Ruby version, it's no longer maintained.

When I first attempted to install fzf, I received an error saying that Ruby was not installed so I installed it

Can you post the log message? I wonder how you ended up with this. The install script should not say anything about Ruby on Linux.

Take the following steps.

  1. Check the output of which fzf. And $PATH should contain ~/.fzf/bin, not ~/.fzf

  2. Forget about Ruby or Go, let's just reinstall fzf as follows

    rm -rf ~/.fzf
    git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
    ~/.fzf/install
    # Say yes to the questions
  3. Your .bashrc should be now updated. Reload it: source ~/.bashrc

  4. See if which fzf is pointing to ~/.fzf/bin/fzf. No? Examine your $PATH variable.

@effohenteee
Copy link
Author

Thank you for the quick reply! All is working now after your suggestion #1.

The log said that fzf was already found in path and which fzf returned ~/bin/fzf
screenshot from 2016-10-03 22-48-45

I deleted /bin/fzf and reinstalled using your instructions. /.fzf/bin is in the path now everything is working beautifully.

screenshot from 2016-10-03 22-56-34

I am not sure how that file ended up there, definitely user error though. I will look into that but for now the version is showing properly and everything is working great. Thank you very much for your help.

@junegunn
Copy link
Owner

junegunn commented Oct 4, 2016

No problem.

@junegunn junegunn closed this as completed Oct 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants