feat(Bash): support bash
This commit is contained in:
23
bash/integrations/fzf.sh
Normal file
23
bash/integrations/fzf.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ -z "${FZF_DEFAULT_COMMAND:-}" ]]; then
|
||||
if command -v fd >/dev/null 2>&1; then
|
||||
export FZF_DEFAULT_COMMAND='fd --type f --hidden --exclude .git'
|
||||
elif command -v rg >/dev/null 2>&1; then
|
||||
export FZF_DEFAULT_COMMAND='rg --files --hidden --glob "!.git/*"'
|
||||
elif command -v ag >/dev/null 2>&1; then
|
||||
export FZF_DEFAULT_COMMAND='ag -l --hidden -g "" --ignore .git'
|
||||
fi
|
||||
fi
|
||||
|
||||
if command -v fzf >/dev/null 2>&1; then
|
||||
if [[ -f "$HOME/.fzf.bash" ]]; then
|
||||
source "$HOME/.fzf.bash"
|
||||
elif [[ -f "/usr/share/fzf/key-bindings.bash" ]]; then
|
||||
source "/usr/share/fzf/key-bindings.bash"
|
||||
[[ -f "/usr/share/fzf/completion.bash" ]] && source "/usr/share/fzf/completion.bash"
|
||||
elif [[ -f "/usr/share/doc/fzf/examples/key-bindings.bash" ]]; then
|
||||
source "/usr/share/doc/fzf/examples/key-bindings.bash"
|
||||
[[ -f "/usr/share/doc/fzf/examples/completion.bash" ]] && source "/usr/share/doc/fzf/examples/completion.bash"
|
||||
fi
|
||||
fi
|
||||
6
bash/integrations/starship.sh
Normal file
6
bash/integrations/starship.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if command -v starship >/dev/null 2>&1; then
|
||||
export STARSHIP_CONFIG="${STARSHIP_CONFIG:-$BASH_POLYJUICE_STARSHIP_CONFIG_FILE}"
|
||||
eval "$(starship init bash)"
|
||||
fi
|
||||
5
bash/integrations/zoxide.sh
Normal file
5
bash/integrations/zoxide.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if command -v zoxide >/dev/null 2>&1; then
|
||||
eval "$(zoxide init --cmd z bash)"
|
||||
fi
|
||||
Reference in New Issue
Block a user