Skip to content

Commit 325cb6b

Browse files
authored
Fix Keychain instructions in ssh_agent.md (#1388)
* Fix Keychain instructions in ssh_agent.md * Simplify previous Keychain instructions
1 parent e267e75 commit 325cb6b

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

cookbook/ssh_agent.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,14 @@ do --env {
5555
### [Keychain](https://www.funtoo.org/Funtoo:Keychain)
5656

5757
```nushell
58-
load-env (
59-
keychain --eval --quiet <your ssh keys, eg. id_ed25519>
58+
keychain --eval --quiet <your ssh keys, eg. id_ed25519>
6059
| lines
61-
| split column ";"
62-
| get column1
63-
| first 2
64-
| split column "="
65-
| rename name value
66-
| reduce -f {} {|it, acc| $acc | upsert $it.name $it.value }
67-
)
60+
| where not ($it | is-empty)
61+
| parse "{k}={v}; export {k2};"
62+
| select k v
63+
| transpose --header-row
64+
| into record
65+
| load-env
6866
```
6967

7068
## Non-nushell workarounds

0 commit comments

Comments
 (0)