Skip to content

Commit

Permalink
Update documentation of config alias
Browse files Browse the repository at this point in the history
  • Loading branch information
mickael-menu committed May 20, 2023
1 parent 75205fe commit 1ec777d
Show file tree
Hide file tree
Showing 6 changed files with 123 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/DISCUSSION_TEMPLATE/help.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
title: "[Help] "
body:
- type: checkboxes
id: checks
attributes:
label: Verify
options:
- label: I searched the existing discussions for help
required: true
- type: textarea
id: help
attributes:
label: How can we help you?
validations:
required: true
- type: markdown
attributes:
value: |
:warning: Unfortunately, my time is limited and I can't offer reliable user support. I might answer if you catch me on a slow day, or hopefully someone else will.
14 changes: 14 additions & 0 deletions .github/DISCUSSION_TEMPLATE/ideas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
body:
- type: checkboxes
id: checks
attributes:
label: Verify
options:
- label: I searched the existing discussions for similar ideas
required: true
- type: textarea
id: help
attributes:
label: Share your idea or feature request
validations:
required: true
65 changes: 65 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Bug report
description: File a bug report to help improve zk.
body:
- type: markdown
attributes:
value: |
Thank you for filing a bug report!
- type: checkboxes
id: checks
attributes:
label: Check if applicable
description: |
:warning: My time is limited and if I don't plan on fixing the reported bug myself, I might close this issue. No hard feelings.
:heart: But if you would like to contribute a fix yourself, **I'll be happy to guide you through the codebase and review a pull request**.
options:
- label: I have searched the existing issues (**required**)
required: true
- label: I'm willing to help fix the problem and contribute a pull request
- type: textarea
id: bug-description
attributes:
label: Describe the bug
description: Also tell me, what did you expect to happen?
placeholder: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
id: bug-steps
attributes:
label: How to reproduce?
description: |
Step by step explanation to reproduce the issue.
If you can, drag and drop:
- a zipped sample notebook
- screenshots or a screencast showing the issue
placeholder: |
1. Add a note with the content "..."
2. Run `zk edit --interactive`
3. See error
...
validations:
required: true
- type: textarea
id: vim-config
attributes:
label: zk configuration
description: |
Paste the minimal `zk` configuration file (`.zk/config.toml`) reproducing the issue.
render: toml
validations:
required: true
- type: textarea
id: bug-environment
attributes:
label: Environment
description: |
Run the following shell commands and paste the result here:
```
zk --version && echo "system: `uname -srmo`"
```
placeholder: |
zk 0.13.0
system: Darwin 22.5.0 arm64
render: bash
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Feature request
description: Suggest an idea for this project.
body:
- type: checkboxes
id: checks
attributes:
label: If you have an idea, open a discussion
options:
- label: I will [create a new discussion](https://github.com/mickael-menu/zk/discussions/new?category=ideas) instead of an issue.

13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/support.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: User support
description: You need help?
body:
- type: markdown
attributes:
value: |
:warning: Unfortunately, my time is limited and I can't offer reliable user support. I might answer if you catch me on a slow day, or hopefully someone else will.
- type: checkboxes
id: checks
attributes:
label: If you need help, open a discussion
options:
- label: I will [create a new discussion](https://github.com/mickael-menu/zk/discussions/new?category=help) instead of an issue.
3 changes: 2 additions & 1 deletion docs/config-alias.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Declaring your own aliases is a great way to make your experience with `zk` easi
Command aliases are declared in your [configuration file](config.md), under the `[alias]` section. They are executed with [your default shell](tool-shell.md), which allows you to:

* expand arguments with `$@` or `$*`
* [it is recommended to wrap `$@` in quotes](https://github.com/mickael-menu/zk/issues/316#issuecomment-1543564168)
* expand environment variables
* run several commands with `&&`
* pipe several commands with `|`
Expand All @@ -17,7 +18,7 @@ An alias can call other aliases but cannot call itself. This enables you to over

```toml
[alias]
edit = "zk edit --interactive $@"
edit = 'zk edit --interactive "$@"'
```

When running an alias, the `ZK_NOTEBOOK_DIR` environment variable is set to the absolute path of the current notebook. You can use it to run commands working no matter the location of the working directory.
Expand Down

0 comments on commit 1ec777d

Please sign in to comment.