All Projects → jorgebucaran → Replay.fish

jorgebucaran / Replay.fish

Licence: mit
Run Bash commands replaying changes in Fish. 🍤

Programming Languages

shell
77523 projects
bash
514 projects

Labels

Projects that are alternatives of or similar to Replay.fish

Packages Main
Primary Oh My Fish package repository.
Stars: ✭ 138 (-40%)
Mutual labels:  fish
Powerline
Powerline is a statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, tmux, IPython, Awesome and Qtile.
Stars: ✭ 12,989 (+5547.39%)
Mutual labels:  fish
Shellder
🐚 Featured zsh/fish shell theme
Stars: ✭ 192 (-16.52%)
Mutual labels:  fish
Dotfiles
Config for vim sublime awesome xmonad etc.
Stars: ✭ 140 (-39.13%)
Mutual labels:  fish
Getopts.fish
Parse CLI options in Fish.
Stars: ✭ 166 (-27.83%)
Mutual labels:  fish
Powerline Go
A beautiful and useful low-latency prompt for your shell, written in go
Stars: ✭ 2,299 (+899.57%)
Mutual labels:  fish
Dots
Personal *nix configuration files
Stars: ✭ 136 (-40.87%)
Mutual labels:  fish
Pisces
♓️ Fish shell plugin that helps you to work with paired symbols in the command line
Stars: ✭ 210 (-8.7%)
Mutual labels:  fish
Dotfiles
💻 macOS System Configuration with Fish, Package Control, VS Code, Repo management, Hammerspoon
Stars: ✭ 168 (-26.96%)
Mutual labels:  fish
Gitmux
💻 Git in your tmux status bar
Stars: ✭ 180 (-21.74%)
Mutual labels:  fish
Gh
Easily manage your local git repos
Stars: ✭ 156 (-32.17%)
Mutual labels:  fish
Z.lua
⚡ A new cd command that helps you navigate faster by learning your habits.
Stars: ✭ 2,164 (+840.87%)
Mutual labels:  fish
Kafkactl
Command Line Tool for managing Apache Kafka
Stars: ✭ 177 (-23.04%)
Mutual labels:  fish
Sdkman For Fish
Adds support for SDKMAN! to fish
Stars: ✭ 139 (-39.57%)
Mutual labels:  fish
Zoxide
A smarter cd command. Supports all major shells.
Stars: ✭ 4,422 (+1822.61%)
Mutual labels:  fish
Hydro
Ultra-pure, lag-free prompt with async Git status. Designed for Fish.
Stars: ✭ 137 (-40.43%)
Mutual labels:  fish
Plugin Nvm
Node version manager wrapper for Fish shell
Stars: ✭ 173 (-24.78%)
Mutual labels:  fish
Spark.fish
▁▂▄▆▇█▇▆▄▂▁
Stars: ✭ 229 (-0.43%)
Mutual labels:  fish
Awsm.fish
A curation of prompts, plugins & other resources for Fish. 🐚
Stars: ✭ 2,641 (+1048.26%)
Mutual labels:  fish
Dotfiles
My [NeoVim + Tmux + Fish Shell] Setup /w install scripts
Stars: ✭ 180 (-21.74%)
Mutual labels:  fish

replay.fish

Run Bash commands replaying changes in Fish. 🍤

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?

$ 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.

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.

Installation

Install with Fisher:

fisher install jorgebucaran/replay.fish

Quickstart

This sets the environment variable PYTHON in your session.

$ replay export PYTHON=python2
$ echo $PYTHON
python2

This will download and install the latest Node release (requires nvm).

$ replay "source ~/.nvm/nvm.sh --no-use && nvm use latest"

Bash aliases? You got it.

$ replay alias g=git
$ g init
Initialized empty Git repository in /home/users/jb/code/replay.fish/.git/

Replay will even take care of special variables like $PWD, switching directories if needed.

$ pwd
/home/users/jb/replay.fish
$ replay cd ~
$ pwd
/home/users/jb

Replay is not bulletproof! Interactive utilities, such as ssh-add are not currently supported.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].