-
Notifications
You must be signed in to change notification settings - Fork 166
Add zk config alias, resolves feature request in issue #253.
#484
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
base: dev
Are you sure you want to change the base?
Conversation
|
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 In line with that I don't think There are no doubt future use cases for If you're not up for restructuring yourself, not a worry. I can look at it at some point 👍 This is excellent ground work as it is :) Thanks again. A secondary thought could be to refactor the logic for |
|
I have reworked the Especially for the copied logic from |
|
This pull request has been automatically marked as stale because it has not had recent activity. |
tests/cmd-config-list.tesh
Outdated
|
|
||
| # Print aliases as json. | ||
| $ zk config --list aliases --format=json | ||
| >[{"conf":"$EDITOR "$ZK_NOTEBOOK_DIR/.zk/config.toml""},{"editlast":"zk edit --limit 1 --sort modified- $@"},{"hist":"zk list --format path --delimiter0 --quiet $@ | xargs -t -0 git log --patch --"},{"list":"zk list --quiet $@"},{"ls":"zk list $@"},{"lucky":"zk list --quiet --format full --sort random --limit 1"},{"path":"zk list --quiet --format \{{path}} --delimiter , $@"},{"recent":"zk edit --sort created- --created-after 'last two weeks' --interactive"}] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"conf":"$EDITOR "$ZK_NOTEBOOK_DIR/.zk/config.toml""
Quotes here don't make sense. This is not valid JSON.
internal/cli/cmd/config.go
Outdated
| } | ||
|
|
||
| var defaultMapFormats = map[string]string{ | ||
| "json": `{"%s":"%s"}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use go's native JSON formatting capabilities, this doesn't properly escape items.
|
Unless others have strong feelings about this, I think we can do without |
|
@WhyNotHugo Fine by me 👍 |
…guration objects like aliases, filters or extras.
This is an empty commit. It serves to notify that ALOT of commits were made in fixing the GitHub CI for this release. The last notable commit before all this noise was: 2f8be08
…sonl in internal/cli/cmd/config.go
…guration objects like aliases, filters or extras.
…guration objects like aliases, filters or extras.
c894ba6 to
1e554c0
Compare
|
@WhyNotHugo Thanks for your review, I've adjusted my PR. |
zk config aliaslists the aliases in the configuration file.Closes #253.