mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-01 04:30:37 +02:00
Change init behavior
Build the cache file instead of using de default file
This commit is contained in:
parent
1b5d21e526
commit
cb6527a05e
2 changed files with 3 additions and 10 deletions
|
|
@ -1,5 +0,0 @@
|
|||
master_ip_default = localhost
|
||||
master_ip = localhost
|
||||
ros_distro_default =
|
||||
ros_interface =
|
||||
ros_workspace =
|
||||
|
|
@ -269,11 +269,9 @@ rosworkspace() {
|
|||
_omz_ros_config_init() {
|
||||
[ ! -d "$ZSH_CACHE_DIR" ] && mkdir -p "$ZSH_CACHE_DIR"
|
||||
if [ ! -f "$ZSH_CACHE_DIR/ros.cache" ]; then
|
||||
cp "$_OMZ_ROS_DIR/ros.cache.default" "$ZSH_CACHE_DIR/ros.cache" || \
|
||||
return "$?"
|
||||
[ ! "$(_omz_ros_config_get_line 'ros_distro_default')" ] && \
|
||||
_omz_ros_config_set_line 'ros_distro_default' \
|
||||
$(_omz_ros_distro_get_list | tail -n 1) || return "$?"
|
||||
touch "$ZSH_CACHE_DIR/ros.cache" && \
|
||||
rosdistro default "$(_omz_ros_distro_get_list | tail -n 1)" && \
|
||||
rosmaster default 'localhost' || return "$?"
|
||||
fi
|
||||
|
||||
return 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue