You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to improve the newly introduced cd_on_quit feature.
Currently, the cd_on_quit features requires bash users to copy/paste some code into their .bashrc. This code is arguably a bit large and will probably never be updated.
I propose that we take some inspiration from zoxide. Zoxide has a init command that prints the correct cd_on_quit code for a passed shell. If sbf would also have such an init command, running sbf init bash would give us the code that we'd have to copy/paste into .bashrc.
This is arguably only a small improvement, but we can do even better!
We can call sbf init bash inside the .bashrc file and directly evaluate the returned code.
In practice, we'd have to insert the following line in our bashrc:
eval"$(sbf init bash)"
Equvivalently, for powershell we'd have to add the following code to $PROFILE:
The part you want to Enhancement
I want to improve the newly introduced cd_on_quit feature.
Currently, the cd_on_quit features requires bash users to copy/paste some code into their
.bashrc
. This code is arguably a bit large and will probably never be updated.I propose that we take some inspiration from zoxide. Zoxide has a
init
command that prints the correctcd_on_quit
code for a passed shell. If sbf would also have such an init command, runningsbf init bash
would give us the code that we'd have to copy/paste into.bashrc
.This is arguably only a small improvement, but we can do even better!
We can call
sbf init bash
inside the.bashrc
file and directly evaluate the returned code.In practice, we'd have to insert the following line in our
bashrc
:Equvivalently, for powershell we'd have to add the following code to
$PROFILE
:Why it is necessary to enhancement
This gives us the following advantages:
sbf.exe
would no longer be hard-coded.The text was updated successfully, but these errors were encountered: