Skip to content

Commit

Permalink
Merge pull request warrensbox#86 from bmbferreira/patch-1
Browse files Browse the repository at this point in the history
Add function to automatic switch for fish shell
  • Loading branch information
warrensbox authored Sep 9, 2021
2 parents acbc675 + 157b535 commit bf9ae7b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ alias cd='cdtgswitch'

**Automatically switch with zsh**


Add the following to the end of your `~/.zshrc` file:

```
Expand Down Expand Up @@ -123,6 +122,21 @@ 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)
Expand Down

0 comments on commit bf9ae7b

Please sign in to comment.