Compare commits
3 Commits
ba9eba596f
...
b4ce10f1bd
Author | SHA1 | Date | |
---|---|---|---|
b4ce10f1bd | |||
1bdaa8ac08 | |||
47082002f9 |
@ -84,14 +84,16 @@ EOF
|
|||||||
integer index=0
|
integer index=0
|
||||||
if [[ ${#local_build_dirs} -eq 0 ]]; then
|
if [[ ${#local_build_dirs} -eq 0 ]]; then
|
||||||
error "no build directories found"; return 1
|
error "no build directories found"; return 1
|
||||||
|
elif [[ ${#local_build_dirs} -eq 1 ]]; then
|
||||||
|
local_build_dir=${local_build_dirs[1]}
|
||||||
elif [[ ${#local_build_dirs} -gt 1 ]]; then
|
elif [[ ${#local_build_dirs} -gt 1 ]]; then
|
||||||
if command -v fzf &> /dev/null; then
|
if command -v fzf &> /dev/null; then
|
||||||
# Use fzf to select a build directory
|
# Use fzf to select a build directory
|
||||||
local max=$(( $( tput lines ) / 2 ))
|
local max=$(( $( tput lines ) / 2 ))
|
||||||
local best=$(( ${#local_build_dirs} + 5 ))
|
local best=$(( ${#local_build_dirs} + 3 ))
|
||||||
local_build_dir=$(
|
local_build_dir=$(
|
||||||
printf '%s\n' "${local_build_dir[@]}" $local_build_dirs |
|
printf '%s\n' "${local_build_dirs[@]}" |
|
||||||
fzf --layout=reverse --info=hidden --border=rounded \
|
fzf --layout=reverse --info=hidden --border=rounded --tac \
|
||||||
--height=$(( $best < $max ? $best : $max ))
|
--height=$(( $best < $max ? $best : $max ))
|
||||||
)
|
)
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
|
8
zshenv
8
zshenv
@ -62,6 +62,14 @@ elif command -v vim &> /dev/null; then
|
|||||||
fi
|
fi
|
||||||
export GIT_EDITOR=$EDITOR
|
export GIT_EDITOR=$EDITOR
|
||||||
|
|
||||||
|
if command -v fzf &> /dev/null; then
|
||||||
|
export FZF_DEFAULT_OPTS='--no-bold
|
||||||
|
--color=fg:#c5c9c5,fg+:#c5c9c5,bg:#000000,bg+:#393836
|
||||||
|
--color=hl:#8ea4a2,hl+:#8ea4a2,info:#afaf87,marker:#C8C093
|
||||||
|
--color=prompt:#C8C093,spinner:#8992a7,pointer:#FF9E3B,header:#87afaf
|
||||||
|
--color=gutter:#000000,border:#54546D,label:#aeaeae,query:#c5c9c5'
|
||||||
|
fi
|
||||||
|
|
||||||
# Use ~/.local for pip installs on macOS
|
# Use ~/.local for pip installs on macOS
|
||||||
[ "`uname`" = "Darwin" ] && export PYTHONUSERBASE=$HOME/.local
|
[ "`uname`" = "Darwin" ] && export PYTHONUSERBASE=$HOME/.local
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user