Skip to content

Commit

Permalink
Merge pull request #52 from ublue-os/m2giles-more-completions
Browse files Browse the repository at this point in the history
feat(bluefin-cli): enable fzf-keybindings
  • Loading branch information
castrojo authored Feb 7, 2024
2 parents cab6ca3 + 9394e6a commit ef33886
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
7 changes: 6 additions & 1 deletion toolboxes/bluefin-cli/files/etc/bashrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# shellcheck shell=bash disable=SC1091
# /etc/bashrc

# System wide functions and aliases
Expand Down Expand Up @@ -47,7 +48,11 @@ if [ -z "$BASHRCSOURCED" ]; then
fi
STARSHIP_CONFIG=/etc/starship.toml
export STARSHIP_CONFIG
eval "$(starship init $SHELL)"
eval "$(starship init bash)"

# Enable fzf keybindings
[ -r /run/host/usr/share/fzf/shell/key-bindings.bash ] && \
. /run/host/usr/share/fzf/shell/key-bindings.bash

# Enable atuin and bash-prexec
source /usr/share/bash-prexec
Expand Down
20 changes: 16 additions & 4 deletions toolboxes/bluefin-cli/files/etc/profile.d/bash_completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@ if [ "x${BASH_VERSION-}" != x -a "x${PS1-}" != x -a "x${BASH_COMPLETION_VERSINFO
[ "${BASH_VERSINFO[0]}" -eq 4 -a "${BASH_VERSINFO[1]}" -ge 2 ]; then
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion" ] &&
. "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion"
if shopt -q progcomp && [ -r /usr/share/bash-completion/bash_completion ]; then
# Source completion code.
. /usr/share/bash-completion/bash_completion
if shopt -q progcomp && [ -d /usr/share/bash-completion/completions ]; then
for rc in /usr/share/bash-completion/completions/*; do
if test -r "$rc"; then
. "$rc"
fi
done
unset rc
fi
if shopt -q progcomp && [ -r /usr/local/share/bash-completion/bash_completion ]; then
# Source completion code.
. /usr/local/share/bash-completion/bash_completion
fi
if ! test -L /home/linuxbrew/.linuxbrew/etc/bash_completion.d/brew && test "$(id -u)" -gt 0; then
/home/linuxbrew/.linuxbrew/bin/brew completions link
/home/linuxbrew/.linuxbrew/bin/brew completions link > /dev/null
fi
if test -d /home/linuxbrew/.linuxbrew/etc/bash_completion.d; then
for rc in /home/linuxbrew/.linuxbrew/etc/bash_completion.d/*; do
Expand All @@ -26,5 +30,13 @@ if [ "x${BASH_VERSION-}" != x -a "x${PS1-}" != x -a "x${BASH_COMPLETION_VERSINFO
done
unset rc
fi
if test -d /run/host/etc/bash_completion.d; then
for rc in /run/host/etc/bash_completion.d/*; do
if test -r "$rc"; then
. "$rc"
fi
done
unset rc
fi
fi
fi
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ if status is-interactive
eval "$(starship init fish)"
eval "$(atuin init fish)"
eval "$(zoxide init fish --cmd cd)"
set -gx HOST (hostname -s)
end

# Eza for ls
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
function fish_title
set -q argv[1]; or set argv fish
echo "$USER@$HOST" (fish_prompt_pwd_dir_length=1 prompt_pwd): $argv
end

0 comments on commit ef33886

Please sign in to comment.