Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

psprint
Copy link
Contributor

@psprint psprint commented Sep 29, 2022

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@psprint
Copy link
Contributor Author

psprint commented Sep 29, 2022

I've also updated README.

@psprint psprint force-pushed the vars-cleanup branch 3 times, most recently from 5be46b8 to 3bb8e5b Compare September 29, 2022 10:08
README.md Outdated Show resolved Hide resolved
@psprint
Copy link
Contributor Author

psprint commented Sep 29, 2022

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

@Ryooooooga
Copy link
Contributor

Ryooooooga commented Sep 29, 2022

As mentioned in #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
Copy link
Contributor Author

psprint commented Sep 29, 2022

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
Copy link
Contributor Author

psprint commented Sep 29, 2022

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants