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