Uploaded image for project: 'Funtoo Linux'
  1. Funtoo Linux
  2. FL-2006

Keychain --eval code for Fish is missing semicolons

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Fish 2.1.1

      Description

      The code keychain --eval emits for fish looks like

      set -e SSH_AUTH_SOCK; and set -x -U SSH_AUTH_SOCK /tmp/ssh-7BecKqFiVNce/agent.2580
      set -e SSH_AGENT_PID; and set -x -U SSH_AGENT_PID 2767
      
      set -e GPG_AGENT_INFO; and set -x -U GPG_AGENT_INFO /tmp/gpg-23iZ8D/S.gpg-agent:2768:1
      

      If you try to eval this, Fish doesn't interpret the newline as a new command, and jams set -e SSH_AGENT onto the end of SSH_AUTH_SOCK, and so on. A simple workaround: swap out newlines for semicolons in your .config/fish/config.fish:

      # Load SSH Keys
      if status --is-interactive
        eval (keychain --eval --quiet -Q id_rsa | tr \n \;)
      end
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              aphyr aphyr null
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: