zk icon indicating copy to clipboard operation
zk copied to clipboard

Add `zk config alias`, resolves feature request in issue #253.

Open andrebauer opened this issue 11 months ago • 5 comments

zk config alias lists the aliases in the configuration file.

Closes #253.

andrebauer avatar Dec 25 '24 22:12 andrebauer

Thanks for this :) Having an initial look at it now. May be a bit slow as I'm starting a new job next week.

My initial thoughts is that it would be good to structure this config.go file in a way that makes it simple to add new config commands.

In line with that I don't think zk config should list out the aliases. It should be zk config --list aliases or something to that effect.

There are no doubt future use cases for zk config ... commands, so starting out with that in mind will pay dividends down the track.

If you're not up for restructuring yourself, not a worry. I can look at it at some point :+1:

This is excellent ground work as it is :) Thanks again.

A secondary thought could be to refactor the logic for cmd.header, cmd.delimter, etc into a function somewhere instead of copying from cmd.List. But maybe thats too soon of an optimization.

tjex avatar Jan 03 '25 17:01 tjex

I have reworked the zk config so that zk config --list OBJECT now list the aliases, filters or extras. For further improvements I ask you to give me more specific suggestions.

Especially for the copied logic from cmd.List, the question would be to which file that should be transferred. But this may already be a separate issue?

andrebauer avatar Jan 03 '25 20:01 andrebauer

This pull request has been automatically marked as stale because it has not had recent activity.

github-actions[bot] avatar Apr 18 '25 01:04 github-actions[bot]

Unless others have strong feelings about this, I think we can do without jsonl formatting to keep complexity down.

WhyNotHugo avatar Dec 03 '25 16:12 WhyNotHugo

@WhyNotHugo Fine by me 👍

tjex avatar Dec 03 '25 17:12 tjex