to install with correct checksum replace for:
sha256sums=('644f741530120856c4bd8e63b95174af172c85a2c378eaf87db9e8e4717aabb3'
'72d90ed4eff98e83786e713d69452c086194d901cc69422df1b4a276172e0825'
'2d181a7964eb179edcddd5063223f8ad831620ade185f8673f6347f255972fc2')
Search Criteria
Package Details: fzf 0.10.2-1
Package Actions
| Package Base: | fzf |
|---|---|
| Description: | Command-line fuzzy finder |
| Upstream URL: | https://github.com/junegunn/fzf |
| Category: | system |
| Licenses: | |
| Submitter: | atweiden |
| Maintainer: | atweiden |
| Last Packager: | atweiden |
| Votes: | 16 |
| First Submitted: | 2014-09-02 05:21 |
| Last Updated: | 2015-08-02 22:16 |
Dependencies (9)
Required by (3)
Sources
- fzf-0.10.2.tar.gz
- key-bindings.bash.patch
- key-bindings.zsh.patch
Latest Comments
Comment by slav
Comment by atweiden
Bash keybindings are now installed to /etc/profile.d/fzf.bash (formerly /etc/profile.d/fzf.sh)
Comment by slav
@bmedicke ---> thanks!
Comment by bmedicke
On arch zsh sources `/etc/profile.d/*.sh` via `/etc/profile`. The install script copies both `fzf.sh` and `fzf.zsh` to `/etc/profile.d`.
zsh picks up the .sh file and throws those errors.
As a quick fix you could rename `/etc/profile.d/fzf.sh` to `/etc/profile.d/fzf.bash` since it need to be sourced manually anyway.
The package should probably install those scripts somewhere else or rename the extension of the bash script. Maybe upstream can include a check but zsh should never really source the .sh script.
Comment by anderraso
@slav I have the same error, don't know why.
Comment by slav
Does someone know why since last fzf update I get this error after login as user when I switch to tty kosole (ctrl+F2)?
$ /usr/share/bash-completion/completions/fzf:42: parse error near `I'
/etc/profile.d/fzf.sh:82: command not found: bind
/etc/profile.d/fzf.sh:82: command not found: bind
/etc/profile.d/fzf.sh:82: command not found: bind
/etc/profile.d/fzf.sh:82: command not found: bind
if log in as root no errors
Comment by atweiden
The fzf-extras AUR package now provides author junegunn's wiki keybindings with selective snippets taken from his dotfiles:
https://aur.archlinux.org/packages/fzf-extras/
https://github.com/atweiden/fzf-extras
Those bindings were previously installed in this PKGBUILD.
The fzf AUR package now only installs the default bash, fish and zsh completions and keybindings from the upstream tarball.
Comment by casimir
That may look like a dumb question but why not using the shell scripts from the tarball?
Comment by atweiden
@jebaum thanks for the tip
Comment by jebaum
I get this error when trying to build the new go version:
# github.com/junegunn/fzf/src/fzf
cannot create <nil>/go.o: No such file or directory
relevant stackoverflow thread:
http://stackoverflow.com/questions/22157629/google-go-get-issue
prepending
TMPDIR=/tmp
to line 41 of the PKGBUILD fixed it
Comment by justin8
Those ones they should be fine with; zsh is bourne shell compatible, so it should be fine. Fish however is not; I don't have much experience with it since I know bash inside and out and that didn't help with it ;)
The parts of the bash script you had in profile.d that didn't work was the ctrl+r, ctrl+t and alt+c bindings, zsh and bash have different syntax for those. The regular functions from that wiki work fine in zsh. The only non-bourne compatible parts I can see is the $() subshell execution, and ZSH implements a superset of bash's features anyway.
Thanks again for those additions. I'll try the new package on the weekend when I get time.
Comment by atweiden
FWIW, I bet fzf.fish and fzf.zsh could pull the same shell scripts from the wiki examples, but I don't know if any of it has been tested on those shells. I'm a lowly user of bash, but if you want to partake in experimentation with other shells and tell us how it goes, copy everything on down from the line "# from fzf/wiki/examples" in fzf.sh into fzf.zsh or fzf.fish and post the results.
Comment by atweiden
Added optional fish support. zsh completions are todo upstream at this time.
Comment by justin8
Yeah, that should be fine. I didn't modify the script at all; just git cloned it from upstream to /tmp and ran ./install (with bash, zsh and fish installed), and those are the scripts it generated.
with the profile.d/fzf.sh I meant that it should be named fzf.bash perhaps, since it is not actually sh-compatible; similar to jre.csh or libreoffice-fresh.csh that I have in mine for scripts compatible with a specific shell.
The zsh-completions file is in the fzf source file you're already downloading. "fzf-completion.zsh" you just need to copy it to somewhere in the build.
Thanks for the fast responses by the way.
Comment by atweiden
OK, I updated the pkgbuild to install bash completions to /usr/share/bash-completion/completions, and added your zsh script (which users can optionally source).
Since the optional /etc/profile.d/fzf.sh script is incompatible with zsh, don't add the line sourcing /etc/profile.d/fzf.sh to your zshrc. zsh users should source /etc/profile.d/fzf.zsh instead.
Regardless, this package does not touch $HOME and shouldn't affect you unless you take manual action.
@justin8, I did leave out this part of your zsh script:
# Setup fzf function
# ------------------
unalias fzf 2> /dev/null
fzf() {
/usr/bin/ruby /tmp/fzf/fzf "$@"
}
export -f fzf > /dev/null
# Auto-completion
# ---------------
[[ $- =~ i ]] && source /tmp/fzf/fzf-completion.zsh
Naturally, this AUR package installs fzf globally to /usr/bin/fzf. I don't see much point in setting up fzf like that when the /usr/bin/fzf executable starts with a Ruby shebang. Furthermore, the zsh completions do not exist at this point anywhere on the Internet that I can see. I would be happy add zsh completions to this pkg if they are brought to my attention.
To reiterate, /etc/profile.d/fzf.sh does nothing on its own, so as to ensure that this package will not affect $HOME. fzf.sh was only ever intended as an optional component and it's designed with Arch bash users in mind. If you use bash and you like fzf, you're going to want to source /etc/profile.d/fzf.sh. It generally brings in all of the keybindings from the fzf wiki and finesses them to assume an FZF executable sanely installed to /usr/bin. If you don't want those keybindings for whatever reason, don't source it; or source /etc/profile.d/fzf.zsh, but note the zsh support isn't as complete as the bash support at this time.
Comment by justin8
My bad; I linked directly from my webdav upload directory; try these:
https://sync.dray.be/public/misc/fzf.zsh
https://sync.dray.be/public/misc/fzf.fish
https://sync.dray.be/public/misc/fzf.bash
I don't know where the fzf-completion.zsh file should go; so there is a dummy path in there for it.
And I think the correct path for bash completions is /usr/share/bash-completion/completions. At least that is what bash-completions installs them in to.
Comment by atweiden
justin8: dray.be is throwing a 401 unauthorized error. Can you reup somewhere else?
Comment by justin8
Please use these 3 files instead of fzf.sh; it is misleading since it is purely going to work in bash; not zsh or sh or fish:
https://sync.dray.be/uploads/public/misc/fzf.zsh
https://sync.dray.be/uploads/public/misc/fzf.fish
https://sync.dray.be/uploads/public/misc/fzf.bash
They were just created by using the install script in the repo.