zdharma-continuum / zinit

🌻 Flexible and fast ZSH plugin manager
MIT License
2.95k stars 126 forks source link

Use hash -d to allow completion of ~DIR #381

Open psprint opened 1 year ago

psprint commented 1 year ago

Description

Remove global aliases because their limited use (ZIDIR/… isn't working) and replace typeset -g … with hash -d … so that the named directories are completed. Eg.: ~ZI<tab> looks like:
2022-09-29-092742_1892x117_scrot

Motivation and Context

As in #378.

Related Issue(s)

378.

Usage examples

# This moves to: /home/q/.local/share/zinit
cd ~ZIDIR

How Has This Been Tested?

Types of changes

Checklist:

psprint commented 1 year ago

I've also updated README.

psprint commented 1 year ago

@jankatins : I've added an example of named dir. Thanks

Ryooooooga commented 1 year ago

As mentioned in https://github.com/zdharma-continuum/zinit/pull/378, I have questions about introducing named directories as a core feature.

Such "something useful" should be realized as a plugin, not as a part of zinit itself. Convenience can be achieved through plugins, but simplicity is not.

psprint commented 1 year ago

Such "something useful" should be realized as a plugin, not as a part of zinit itself. Convenience can be achieved through plugins, but simplicity is not.

I've never wrote "something useful". And the hypothetical plugin would be an EMPTY one (1 line of code), to provide for zinit, which knows the paths best and owns them, so it should manage to label them via named dirs. Otherwise it would be laughable.

psprint commented 1 year ago

I've no interest in future argument. I think that it is clear that Zinit should provide for itself, especially as it is single line of code, and I hope that other developers agree with me like @jankatins apparently is.

jankatins commented 1 year ago

I stoped using them again because I found typing ~ on a mac too much pain :-/. Went back to use making aliases cdx for all my relevant dirs I need... The rest is in mcfly/ctrl+r