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
This CWD formatting should be available in all major shell, and editors if needed.
(IDEA: make a Rust impl usable everywhere? or re-impl everywhere?)
2-3 parts:
By default, path is split and only last 2 items are kept: …/nested/dir
When the 3rd last item is $HOME, put ~ instead of …
When the 3rd last item is a Windows drive, put that drive (C:\) instead of …
Examples
Given:
mybar is a named dir pointing to /foo/bar
deeper is a named dir pointing to /foo/bar/somewhere/deeper
myrepo is a named dir pointing to /path/to/reponame
Arbitrary path
When in /foo/bar/baz:
Show: ~mybar
When in /foo/bar/baz:
Show: ~mybar/baz
When in /foo/bar/deep/baz:
Show: …/bar/baz (?or ~mybar (bmark)/deep/baz?)
When in /path/to/somewhere:
Show: …/to/somewhere
When in /foo/bar/somewhere/deeper/in/nested/baz:
Show: ~deeper/baz (and NOT ~mybar …/nested/baz)
Git repos
When inside a git repo, show the repo name followed by the last 2 path items.
The repo name should be colored differently from the rest of the path items (with a bg color? customizable?).
MAYBE: Actually I could do this also for named directories 🤔
where the persistent part is the alias for named dir, and the remaining of the path is put on the side 👀
When (git) is mentioned here, it should be replaced by a git icon.
When in /path/to/reponame:
Show: ~myrepo (git)
When in /path/to/other-repo:
Show: …/to/other-repo (git)
When in /path/to/reponame/in/nested:
Show: ~myrepo (git)/in/nested
When in /path/to/reponame/in/nested/dir:
Show: ~myrepo (git)…/in/nested
When in /path/to/other-repo/in/nested:
Show: …/to/other-repo (git)/in/nested
The text was updated successfully, but these errors were encountered:
This CWD formatting should be available in all major shell, and editors if needed.
(IDEA: make a Rust impl usable everywhere? or re-impl everywhere?)
2-3 parts:
…/nested/dir
~
instead of…
C:\
) instead of…
Examples
Given:
mybar
is a named dir pointing to/foo/bar
deeper
is a named dir pointing to/foo/bar/somewhere/deeper
myrepo
is a named dir pointing to/path/to/reponame
Arbitrary path
When in
/foo/bar/baz
:Show:
~mybar
When in
/foo/bar/baz
:Show:
~mybar/baz
When in
/foo/bar/deep/baz
:Show:
…/bar/baz
(?or~mybar (bmark)/deep/baz
?)When in
/path/to/somewhere
:Show:
…/to/somewhere
When in
/foo/bar/somewhere/deeper/in/nested/baz
:Show:
~deeper/baz
(and NOT~mybar …/nested/baz
)Git repos
When inside a git repo, show the repo name followed by the last 2 path items.
The repo name should be colored differently from the rest of the path items (with a bg color? customizable?).
MAYBE: Actually I could do this also for named directories 🤔
where the persistent part is the alias for named dir, and the remaining of the path is put on the side 👀
When
(git)
is mentioned here, it should be replaced by a git icon.When in
/path/to/reponame
:Show:
~myrepo (git)
When in
/path/to/other-repo
:Show:
…/to/other-repo (git)
When in
/path/to/reponame/in/nested
:Show:
~myrepo (git)/in/nested
When in
/path/to/reponame/in/nested/dir
:Show:
~myrepo (git)…/in/nested
When in
/path/to/other-repo/in/nested
:Show:
…/to/other-repo (git)/in/nested
The text was updated successfully, but these errors were encountered: