From 70b05034d21e264c1a67eddaece5af04ab301260 Mon Sep 17 00:00:00 2001 From: Mitchell Ludwig Date: Sun, 15 Sep 2019 00:32:11 -0600 Subject: [PATCH] Added decaying with time, fixed powershell, fixed windows git bash, fixed jc and child directory descent --- bin/autojump_profile.ps1 | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 bin/autojump_profile.ps1 diff --git a/bin/autojump_profile.ps1 b/bin/autojump_profile.ps1 new file mode 100644 index 0000000..c5ff771 --- /dev/null +++ b/bin/autojump_profile.ps1 @@ -0,0 +1,29 @@ +Set-Alias -Name ll -Value ls +Function .. {cd ..} +Function ... {cd ../..} +Function .... {cd ../../..} +Function ..... {cd ../../../..} +Function ...... {cd ../../../../..} +Function ....... {cd ../../../../../..} +Function ........ {cd ../../../../../../..} +Function ......... {cd ../../../../../../../..} +Function .......... {cd ../../../../../../../../..} + +Function j { + $jumpdir = autojump $args + echo "$jumpdir" + cd $jumpdir +} + +Function jc { + j "$pwd" @args +} + +Function g { + $repo_root = git rev-parse --show-toplevel + j $repo_root @args +} + +Set-PSBreakpoint -Variable pwd -Mode Write -Action { + autojump --add "$pwd" +} | out-null