Skip to content

Commit

Permalink
refactor ssh-agent cookbook example (nushell#982)
Browse files Browse the repository at this point in the history
* break the `ssh-agent` line for readability

* add a NOTE about changing `tranpose -i -r -d`

* remove the `ssh-add` final step as it's not useful

i use it everyday and never had to run that command in my config.

* fix the pipeline

related to nushell/nushell#9710
  • Loading branch information
amtoine committed Jul 21, 2023
1 parent 5dec614 commit 68b315e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions cookbook/misc.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ title: Miscellaneous

`eval` is not available in nushell, so run:

```nushell
ssh-agent -c
| lines
| first 2
| parse "setenv {name} {value};"
| transpose -r
| into record
| load-env
```
ssh-agent -c | lines | first 2 | parse "setenv {name} {value};" | transpose -i -r -d | load-env
```

Then `ssh-add` will enable to only type your SSH passphrase once.

# Miscellaneous

Expand Down

0 comments on commit 68b315e

Please sign in to comment.