在鱼壳中启用redhats devtoolset

问题描述 投票:0回答:1

是否有适当的方法在启动时启用devtoolset或fish shell中的任何rh工具?通常在Zsh(〜/ .zshrc)或Bash(〜/ .bashrc)中你会添加类似于的行:

source /opt/rh/devtoolset-7/enable

要么

source scl_source enable devtoolset-7

不幸的是,这些都不能在〜/ .config / fish / config.fish中工作,因为fish不支持这种语法。我知道如何做的唯一方法是手动将启用文件中的所有行添加到我的鱼路径。

linux shell redhat fish devtoolset
1个回答
-1
投票

您可以在/etc/fish/config.fish中添加命令

# Put system-wide fish configuration entries here
# or in .fish files in conf.d/
# Files in conf.d can be overridden by the user
# by files with the same name in $XDG_CONFIG_HOME/fish/conf.d

# This file is run by all fish instances.
# To include configuration only for login shells, use
# if status --is-login
#    ...
# end
# To include configuration only for interactive shells, use
# if status --is-interactive
#   ...
# end
source scl_source enable rh-git29
source scl_source enable rh-postgresql10
© www.soinside.com 2019 - 2024. All rights reserved.