]> git.pld-linux.org Git - packages/fzf.git/blob - install.patch
up to 0.35.0
[packages/fzf.git] / install.patch
1 1. disable fish as not packaged and creates broken symlinks
2 1. disabled download as we pre-package
3 1. fix paths to completions
4
5 --- fzf-0.34.0/install~ 2022-09-30 09:21:44.085976824 +0300
6 +++ fzf-0.34.0/install  2022-09-30 09:29:08.782477314 +0300
7 @@ -6,7 +6,7 @@
8  auto_completion=
9  key_bindings=
10  update_config=2
11 -shells="bash zsh fish"
12 +shells="bash zsh"
13  prefix='~/.fzf'
14  prefix_expand=~/.fzf
15  fish_dir=${XDG_CONFIG_HOME:-$HOME/.config}/fish
16 @@ -163,8 +163,9 @@
17    chmod +x fzf && check_binary
18  }
19  
20 -# Try to download binary executable
21  archi=$(uname -sm)
22 +download() {
23 +# Try to download binary executable
24  binary_available=1
25  binary_error=""
26  case "$archi" in
27 @@ -184,6 +185,10 @@
28    Windows*\ *64)      download fzf-$version-windows_amd64.zip    ;;
29    *)                  binary_available=0 binary_error=1          ;;
30  esac
31 +}
32 +
33 +# pre-packaged, so always true
34 +binary_available=1 binary_error=""
35  
36  cd "$fzf_base"
37  if [ -n "$binary_error" ]; then
38 @@ -247,12 +252,12 @@
39    src=${prefix_expand}.${shell}
40    echo -n "Generate $src ... "
41  
42 -  fzf_completion="[[ \$- == *i* ]] && source \"$fzf_base/shell/completion.${shell}\" 2> /dev/null"
43 +  fzf_completion="[[ \$- == *i* ]] && source \"/usr/share/fzf/completion.${shell}\" 2> /dev/null"
44    if [ $auto_completion -eq 0 ]; then
45      fzf_completion="# $fzf_completion"
46    fi
47  
48 -  fzf_key_bindings="source \"$fzf_base/shell/key-bindings.${shell}\""
49 +  fzf_key_bindings="source \"/usr/share/fzf/key-bindings.${shell}\""
50    if [ $key_bindings -eq 0 ]; then
51      fzf_key_bindings="# $fzf_key_bindings"
52    fi
53 @@ -260,9 +265,6 @@
54    cat > "$src" << EOF
55  # Setup fzf
56  # ---------
57 -if [[ ! "\$PATH" == *$fzf_base_esc/bin* ]]; then
58 -  PATH="\${PATH:+\${PATH}:}$fzf_base/bin"
59 -fi
60  
61  # Auto-completion
62  # ---------------
63 @@ -288,7 +290,7 @@
64    fish_binding="${fish_dir}/functions/fzf_key_bindings.fish"
65    if [ $key_bindings -ne 0 ]; then
66      echo -n "Symlink $fish_binding ... "
67 -    ln -sf "$fzf_base/shell/key-bindings.fish" \
68 +    ln -sf "/usr/share/fzf/key-bindings.fish" \
69             "$fish_binding" && echo "OK" || echo "Failed"
70    else
71      echo -n "Removing $fish_binding ... "
This page took 0.039187 seconds and 4 git commands to generate.