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
|
||||
export PATH=$PATH:$HOME/bin/:$HOME/bin/scripts/
|
||||
|
||||
|
@ -104,7 +108,7 @@ ${PROMPT_SYMBOL} "
|
|||
PROMPT_COMMAND=set_bash_prompt
|
||||
|
||||
# fzf is love, fzf is life.
|
||||
source /usr/share/bash-completion/completions/fzf-key-bindings
|
||||
source /usr/share/fzf/key-bindings.bash
|
||||
|
||||
function cdl() {
|
||||
cd $@
|
||||
|
@ -114,7 +118,7 @@ function cdl() {
|
|||
# Functions
|
||||
function cd-projects {
|
||||
dir=$(find ~/Projects -maxdepth 3 -type d | fzf)
|
||||
cd $dir
|
||||
cd "$dir"
|
||||
}
|
||||
|
||||
# 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 gs="git status"
|
||||
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