aboutsummaryrefslogtreecommitdiffstats
path: root/.bashrc
diff options
context:
space:
mode:
authorla-ninpre <leobrekalini@gmail.com>2021-05-31 11:41:23 +0300
committerla-ninpre <leobrekalini@gmail.com>2021-05-31 11:41:23 +0300
commit81a615b8119ea39927d2ac99de932fd2971e53c8 (patch)
treea970d4690d3d7624fb6777d6babbad1cfccfadec /.bashrc
parent8f809f3e24ca8eae68dd54468deeea692d27b02e (diff)
downloaddotfiles-81a615b8119ea39927d2ac99de932fd2971e53c8.tar.gz
dotfiles-81a615b8119ea39927d2ac99de932fd2971e53c8.zip
move fslcd back to bashrc
when it is separate script it's not working, because cd works only when script is running, but when it exits, working directory stays the same. maybe there's a way to do it differently, but for now it will remain just a function inside bashrc.
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc6
1 files changed, 6 insertions, 0 deletions
diff --git a/.bashrc b/.bashrc
index 587a605..7566e80 100644
--- a/.bashrc
+++ b/.bashrc
@@ -42,6 +42,12 @@ export FZF_CTRL_T_COMMAND='$FZF_DEFAULT_COMMAND'
FOSSILS_HOME=$HOME/Documents/Fossils
export FOSSILS_HOME
+# quickly cd into fossil repo
+fslcd() {
+ _fsl_checkout=$(fossil all ls -c | fzf +m)
+ cd "$_fsl_checkout" || return
+}
+
# starship prompt
eval "$(starship init bash)"