Add fzf in bash, add sdkman in .bashrc (still needs section in install script), and fix cd-projects function to work with spaces in project names
parent
1364d03ab6
commit
bc0a2f2da0
12
bash/.bashrc
12
bash/.bashrc
|
@ -1,3 +1,7 @@
|
||||||
|
|
||||||
|
# If not running interactively, don't do anything
|
||||||
|
[[ $- != *i* ]] && return
|
||||||
|
|
||||||
# Add ~/bin and ~/bin/scripts to my path
|
# Add ~/bin and ~/bin/scripts to my path
|
||||||
export PATH=$PATH:$HOME/bin/:$HOME/bin/scripts/
|
export PATH=$PATH:$HOME/bin/:$HOME/bin/scripts/
|
||||||
|
|
||||||
|
@ -104,7 +108,7 @@ ${PROMPT_SYMBOL} "
|
||||||
PROMPT_COMMAND=set_bash_prompt
|
PROMPT_COMMAND=set_bash_prompt
|
||||||
|
|
||||||
# fzf is love, fzf is life.
|
# fzf is love, fzf is life.
|
||||||
source /usr/share/bash-completion/completions/fzf-key-bindings
|
source /usr/share/fzf/key-bindings.bash
|
||||||
|
|
||||||
function cdl() {
|
function cdl() {
|
||||||
cd $@
|
cd $@
|
||||||
|
@ -114,7 +118,7 @@ function cdl() {
|
||||||
# Functions
|
# Functions
|
||||||
function cd-projects {
|
function cd-projects {
|
||||||
dir=$(find ~/Projects -maxdepth 3 -type d | fzf)
|
dir=$(find ~/Projects -maxdepth 3 -type d | fzf)
|
||||||
cd $dir
|
cd "$dir"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Aliases
|
# Aliases
|
||||||
|
@ -122,3 +126,7 @@ alias gg="git log --graph --abbrev-commit --decorate --format=format:'%C(bold bl
|
||||||
alias gca="git add -A; git commit -a --amend --no-edit"
|
alias gca="git add -A; git commit -a --amend --no-edit"
|
||||||
alias gs="git status"
|
alias gs="git status"
|
||||||
alias proj="cd-projects"
|
alias proj="cd-projects"
|
||||||
|
|
||||||
|
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
|
||||||
|
export SDKMAN_DIR="$HOME/.sdkman"
|
||||||
|
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||||
|
|
Loading…
Reference in New Issue