Skip to content

Commit

Permalink
Words
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgebucaran committed Mar 1, 2021
1 parent 7a159e1 commit a820736
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

> Run Bash commands replaying changes in [Fish](https://fishshell.com). 🍤
Let's say you need to run a Bash command, and want Fish to inherit changes in the environment, e.g., exported and unset variables, changes to the `$PATH`, and so on. How do you do that? Here's an idea.
Let's say you need to run a Bash command, and want Fish to inherit changes in the environment, e.g., exported and unset variables, changes to the `$PATH`, and so on. How do you do that?

```console
$ exec bash -c "$commands; exec fish"
```

Caveats? Unfortunately, yes.

There's no way to preserve the last command exit status. You'll lose the entire state of your session; history may not sync up correctly if you have Fish running in other terminal tabs, local variables are gone. Fish takes a little while to start up. Moreover, things Fish is configured to do on startup like running configuration snippets or displaying a custom greeting, may not be appreciated. If jobs are running in the background, they'll be terminated too.
There's no way to preserve the last command exit status. You'll lose the entire state of your session; history may not sync up correctly if you have Fish running in other terminal tabs, local variables are gone. Fish takes a little while to start up. Moreover, things Fish is configured to do on startup like running configuration snippets or displaying a custom greeting may not be appreciated. If jobs are running in the background, they'll be terminated too.

Replay runs your commands in Bash, captures exported variables, aliases, `$PWD` changes, and reproduces them in Fish so you don't have to `exec`-away your session.

Expand All @@ -24,7 +24,7 @@ fisher install jorgebucaran/replay.fish

## Quickstart

This will set the environment variable `PYTHON` in your session.
This sets the environment variable `PYTHON` in your session.

```console
$ replay export PYTHON=python2
Expand Down Expand Up @@ -56,7 +56,7 @@ $ pwd
/home/users/jb
```

> Replay is not bulletproof yet! Interactive utilities, such as [`ssh-add`](http://man7.org/linux/man-pages/man1/ssh-add.1.html) are not currently supported.
> Replay is not bulletproof! Interactive utilities, such as [`ssh-add`](http://man7.org/linux/man-pages/man1/ssh-add.1.html) are not currently supported.
## License

Expand Down

0 comments on commit a820736

Please sign in to comment.