bash: use latest ble.sh version
Use fzf for completion again Fix starship with newest ble.sh version, eval a second time after ble.sh
This commit is contained in:
parent
e6fc6ab811
commit
4dc0f3755c
|
@ -34,7 +34,7 @@ in {
|
|||
|
||||
# Syntax highlighting, auto suggestions, vim modes, etc.
|
||||
# https://github.com/akinomyoga/ble.sh/wiki/Manual-A1-Installation#user-content-nixpkgs
|
||||
source "$(blesh-share)" --attach=none
|
||||
source "$(blesh-share)"/ble.sh --attach=none
|
||||
# ctrl + space to accept autocomplete suggestion
|
||||
ble-bind -m 'auto_complete' -f 'C-@' 'auto_complete/insert-on-end'
|
||||
# Meta (Alt) + Backspace to delete a word
|
||||
|
@ -59,6 +59,7 @@ in {
|
|||
}
|
||||
blehook/eval-after-load complete my/complete-load-hook
|
||||
|
||||
bleopt exec_elapsed_mark=
|
||||
bleopt exec_errexit_mark=
|
||||
bleopt filename_ls_colors="$LS_COLORS"
|
||||
|
||||
|
@ -84,6 +85,11 @@ in {
|
|||
fi
|
||||
|
||||
# end of .bashrc
|
||||
# Somehow we need to ensure starship starts later than ble.sh
|
||||
# (possible packaging issue?)
|
||||
# https://github.com/akinomyoga/ble.sh/issues/333
|
||||
eval "$(${pkgs.starship}/bin/starship init bash)"
|
||||
|
||||
[[ ''${BLE_VERSION-} ]] && ble-attach
|
||||
'';
|
||||
|
||||
|
|
|
@ -10,8 +10,5 @@
|
|||
"--color=fg:#d3d1d4,header:#7accd7,info:#e5c463,pointer:#ef9062"
|
||||
"--color=marker:#ef9062,fg+:#303030,prompt:#e5c463,hl+:#7accd7"
|
||||
];
|
||||
# Use ble.sh for completions, see
|
||||
# modules/terminal-life/bash/default.nix -> bleopt complete_menu_style=desc
|
||||
# and https://github.com/akinomyoga/ble.sh/wiki/Manual-%C2%A77-Completion
|
||||
enableBashIntegration = false;
|
||||
enableBashIntegration = true;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,32 @@
|
|||
final: prev: {
|
||||
blesh = prev.blesh.overrideAttrs (oldAttrs: rec {
|
||||
inherit (prev.sources.blesh-nvfetcher) version src;
|
||||
|
||||
dontBuild = false;
|
||||
buildInputs = [prev.git];
|
||||
patchPhase = ''
|
||||
substituteInPlace GNUmakefile \
|
||||
--replace "git submodule update --init --recursive" ""
|
||||
'';
|
||||
nativeCheckInputs = oldAttrs.nativeCheckInputs ++ [prev.busybox];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p "$out/share/blesh/lib"
|
||||
|
||||
cat <<EOF >"$out/share/blesh/lib/_package.sh"
|
||||
_ble_base_package_type=nix
|
||||
|
||||
function ble/base/package:nix/update {
|
||||
echo "Ble.sh is installed by Nix. You can update it there." >&2
|
||||
return 1
|
||||
}
|
||||
EOF
|
||||
|
||||
make install INSDIR=$out/share/blesh
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue