diff --git a/README.md b/README.md
index 05c8ccb2..30cb5e9f 100644
--- a/README.md
+++ b/README.md
@@ -159,6 +159,29 @@ cd(){
}
```
+**Automatically switch with fish shell**
+
+Add the following to the end of your `~/.config/fish/config.fish` file:
+
+```sh
+function switch_terraform --on-event fish_postexec
+ string match --regex '^cd\s' "$argv" > /dev/null
+ set --local is_command_cd $status
+
+ if test $is_command_cd -eq 0
+ if count *.tf > /dev/null
+
+ grep -c "required_version" *.tf > /dev/null
+ set --local tf_contains_version $status
+
+ if test $tf_contains_version -eq 0
+ command tfswitch
+ end
+ end
+ end
+end
+```
+
### Jenkins setup
diff --git a/www/docs/Quick-Start.md b/www/docs/Quick-Start.md
index de3bff20..0038bb68 100644
--- a/www/docs/Quick-Start.md
+++ b/www/docs/Quick-Start.md
@@ -37,29 +37,6 @@ terraform {
```
-**Automatically switch with fish shell**
-
-Add the following to the end of your `~/.config/fish/config.fish` file:
-
-```sh
-function switch_terraform --on-event fish_postexec
- string match --regex '^cd\s' "$argv" > /dev/null
- set --local is_command_cd $status
-
- if test $is_command_cd -eq 0
- if count *.tf > /dev/null
-
- grep -c "required_version" *.tf > /dev/null
- set --local tf_contains_version $status
-
- if test $tf_contains_version -eq 0
- command tfswitch
- end
- end
- end
-end
-```
-
### Use .tfswitch.toml file (For non-admin - users with limited privilege on their computers)
This is similiar to using a .tfswitchrc file, but you can specify a custom binary path for your terraform installation
@@ -132,3 +109,25 @@ cd(){
fi
}
```
+**Automatically switch with fish shell**
+
+Add the following to the end of your `~/.config/fish/config.fish` file:
+
+```sh
+function switch_terraform --on-event fish_postexec
+ string match --regex '^cd\s' "$argv" > /dev/null
+ set --local is_command_cd $status
+
+ if test $is_command_cd -eq 0
+ if count *.tf > /dev/null
+
+ grep -c "required_version" *.tf > /dev/null
+ set --local tf_contains_version $status
+
+ if test $tf_contains_version -eq 0
+ command tfswitch
+ end
+ end
+ end
+end
+```