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