From fe0e2725ac2d752fd972c2e08a130c6404fb4cd2 Mon Sep 17 00:00:00 2001 From: Bruno Ferreira Date: Tue, 20 Jul 2021 11:49:49 +0100 Subject: [PATCH 1/2] Add function to automatic switch for fish shell Adds instructions for automatic version switching for fish users. --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index eb55cd5..45b2ecd 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,6 @@ alias cd='cdtgswitch' **Automatically switch with zsh** - Add the following to the end of your `~/.zshrc` file: ``` @@ -123,6 +122,22 @@ cd(){ } ``` +**Automatically switch with fish** + + +Add the following to your `~/.config/fish/config.fish` file: + +``` +function cdtgswitch + builtin cd "$argv" + set cdir $PWD + if test -f "$cdir/.tgswitchrc" + tgswitch + end +end +alias cd='cdtgswitch' +``` + ## Additional Info See how to *upgrade*, *uninstall*, *troubleshoot* here:[More info](https://warrensbox.github.io/tgswitch/additional) From 157b53557221a71849ed78adddd82a10ac73988a Mon Sep 17 00:00:00 2001 From: Bruno Ferreira Date: Tue, 20 Jul 2021 11:50:40 +0100 Subject: [PATCH 2/2] Remove unnecessary new line --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 45b2ecd..c462202 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,6 @@ cd(){ **Automatically switch with fish** - Add the following to your `~/.config/fish/config.fish` file: ```