Skip to content

Question: Should <dir> in "autojump --add <dir>" be an absolute path? #45

@maxild

Description

@maxild

I was looking for something cross-plat (windows, macos, linux) that could work in bash, zsh and windows-powershell.

I had to write the j script myself in powershell (because j.bat only works in CMD). I had to hook into cd (set-location), pushd (Push-Location) and popd (Pop-Location), such that the tool could learn how I navigate the filesystem. I have chosen to convert any new location to an absolute path before calling --add sub-command, in order for .., ../.. and other relative paths to have universal meaning (at least at my windows pc).

I wanted to avoid someting like this (because relative paths would loose all meaning in the dynamic config because the tool doesn't know relative to what folder!)

10.0:   .\Projects\config\dotfiles-powershell\
14.1:   .\Projects\
14.1:   ..
17.3:   C:\Users\maxfire\Projects\

Is this how it should be done?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions