Compare commits
9 Commits
8bc2b5efe5
...
main
Author | SHA1 | Date | |
---|---|---|---|
9247e7de79
|
|||
d41f82c771
|
|||
c77fa00f98
|
|||
da8cc2b511
|
|||
ef9c4afff3
|
|||
9dcf45baa5
|
|||
4ac2c06595
|
|||
4935fdbf15
|
|||
ffb23c98fc
|
13
init.zsh
13
init.zsh
@ -305,6 +305,14 @@ if cmd_exists pyenv; then
|
||||
export PYENV_ROOT="${HOME}/.pyenv"
|
||||
[[ -d "${PYENV_ROOT/bin}" ]] && export PATH="${PYENV_ROOT}/bin:${PATH}"
|
||||
eval "$(pyenv init - zsh)"
|
||||
eval "$(pyenv virtualenv-init - zsh)"
|
||||
__zsh_fix_pyenv_prompt() {
|
||||
if [[ -v _OLD_VIRTUAL_PS1 ]]; then
|
||||
PS1="${_OLD_VIRTUAL_PS1}"
|
||||
unset _OLD_VIRTUAL_PS1
|
||||
fi
|
||||
}
|
||||
precmd_functions+=(__zsh_fix_pyenv_prompt)
|
||||
fi
|
||||
|
||||
# Bookmarks
|
||||
@ -318,11 +326,6 @@ fi
|
||||
# Platform specific stuff
|
||||
[ -f /usr/bin/pacman ] && source "${ZSH_CONFIG_DIR}/arch.zsh"
|
||||
|
||||
# Ros2 instll on arch
|
||||
if [[ -v ZSH_ROS2_ROOT ]]; then
|
||||
source "${ZSH_CONFIG_DIR}/lazy-ros2.zsh"
|
||||
fi
|
||||
|
||||
# FZF Integration
|
||||
load_plugin fzf-tab
|
||||
# Disable sort when completing `git checkout`
|
||||
|
@ -1,37 +0,0 @@
|
||||
# Lazy-load ros2 stuff
|
||||
|
||||
(( ${+ZSH_ROS2_ROOT} )) || return
|
||||
|
||||
# Define as a function so it can be overridden for speed
|
||||
function zsh-load-ros2() {
|
||||
source "${ZSH_ROS2_ROOT}/setup.zsh"
|
||||
}
|
||||
|
||||
local defined=()
|
||||
|
||||
local file
|
||||
for file in "${ZSH_ROS2_ROOT}/bin/"*; do
|
||||
local base="${file:t}"
|
||||
hash -- "${base}" 2>/dev/null && continue
|
||||
defined+=("${base}")
|
||||
done
|
||||
|
||||
local undef_args=() def
|
||||
for def in ${defined}; do
|
||||
undef_args+=("${(q)def}")
|
||||
done
|
||||
|
||||
local exec
|
||||
for exec in ${defined}; do
|
||||
eval "
|
||||
function \${(q)exec} {
|
||||
printf 'Setting up ros2 with \"%s\"...\n\n' \\
|
||||
\"\${(q)ZSH_ROS2_ROOT%/}/setup.zsh\"
|
||||
unfunction ${undef_args}
|
||||
zsh-load-ros2 ||
|
||||
{ echo 'Failed to load ros2 libraries!'; return }
|
||||
(( \${#} == 0 )) && ${(q)exec} || ${(q)exec} \"\${@}\"
|
||||
}"
|
||||
done
|
||||
|
||||
unset exec def file defined undef_args
|
Submodule plugins/fast-syntax-highlighting updated: cf318e06a9...3d574ccf48
Submodule plugins/fzf-tab updated: 01dad759c4...fc6f0dcb2d
Submodule plugins/zsh-autosuggestions updated: 0e810e5afa...85919cd1ff
Submodule plugins/zsh-completions updated: 0adf2f053e...5f24f3bc42
Reference in New Issue
Block a user