V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
f1ren2es
V2EX  ›  Linux

OS X 下 fish 与 Git GPG sign 环境变量求助

  •  1
     
  •   f1ren2es · Jun 6, 2019 · 2749 views
  •   You need to sign in to view this topic
    This topic created in 2521 days ago, the information mentioned may be changed or developed.

    求助,使用的 shell 是 fish, 在 gpg 签名这块遇到问题了: 每次在不同终端窗口中使用 git commit -S -m 'example' 都需要手动设置 GPG 变量 set -xU GPG_TTY (tty),找了一圈没找到(太菜了)如何像 bash 一样设置 .bash_profile 呢,有老哥知道嘛

    4 replies    2019-06-07 12:50:49 +08:00
    KeepPro
        1
    KeepPro  
       Jun 6, 2019   ❤️ 1
    fish 设置变量是在 ~/.config/fish/config.fish
    f1ren2es
        2
    f1ren2es  
    OP
       Jun 6, 2019
    @KeepPro 感谢,已解决,加入环境变量到 `config.fish` 就好了
    lancelock
        3
    lancelock  
       Jun 6, 2019   ❤️ 1
    我是写了一个通用的环境配置的文件,然后在 config.fish、zshrc、bash_profile 分别 source 一下就行了
    f1ren2es
        4
    f1ren2es  
    OP
       Jun 7, 2019 via iPhone
    @lancelock 我的理解是在配置文件里引用通用配置文件就好了,是这样吗
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2424 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 15:44 · PVG 23:44 · LAX 08:44 · JFK 11:44
    ♥ Do have faith in what you're doing.