Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## [Unreleased]

### Fixed
- Use POSIX-compliant bracket expressions in awk regexes for busybox compatibility

### Added
- Plugin system: executables named `tk-<cmd>` or `ticket-<cmd>` in PATH are invoked automatically
- `super` command to bypass plugins and run built-in commands directly
Expand Down
24 changes: 12 additions & 12 deletions ticket
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ cmd_dep_tree() {
in_front && /^status:/ { status = $2 }
in_front && /^deps:/ {
deps = $2
gsub(/[\[\] ]/, "", deps)
gsub(/[][ ]/, "", deps)
}
!in_front && /^# / && title == "" { title = substr($0, 3) }
function store() {
Expand Down Expand Up @@ -500,7 +500,7 @@ cmd_dep_cycle() {
in_front && /^status:/ { status = $2 }
in_front && /^deps:/ {
deps = $2
gsub(/[\[\] ]/, "", deps)
gsub(/[][ ]/, "", deps)
}
!in_front && /^# / && title == "" { title = substr($0, 3) }
function store() {
Expand Down Expand Up @@ -674,10 +674,10 @@ cmd_ls() {
in_front && /^id:/ { id = $2 }
in_front && /^status:/ { status = $2 }
in_front && /^assignee:/ { assignee = $2 }
in_front && /^tags:/ { tags = $2; gsub(/[\[\] ]/, "", tags) }
in_front && /^tags:/ { tags = $2; gsub(/[][ ]/, "", tags) }
in_front && /^deps:/ {
deps = $2
gsub(/[\[\] ]/, "", deps)
gsub(/[][ ]/, "", deps)
}
!in_front && /^# / && title == "" { title = substr($0, 3) }
END { if (prev_file) emit() }
Expand Down Expand Up @@ -721,10 +721,10 @@ cmd_ready() {
in_front && /^status:/ { status = $2 }
in_front && /^priority:/ { priority = $2 }
in_front && /^assignee:/ { assignee = $2 }
in_front && /^tags:/ { tags = $2; gsub(/[\[\] ]/, "", tags) }
in_front && /^tags:/ { tags = $2; gsub(/[][ ]/, "", tags) }
in_front && /^deps:/ {
deps = $2
gsub(/[\[\] ]/, "", deps)
gsub(/[][ ]/, "", deps)
}
!in_front && /^# / && title == "" { title = substr($0, 3) }
function has_tag(tags_str, tag, i, n, arr) {
Expand Down Expand Up @@ -815,7 +815,7 @@ cmd_closed() {
in_front && /^id:/ { id = $2 }
in_front && /^status:/ { status = $2 }
in_front && /^assignee:/ { assignee = $2 }
in_front && /^tags:/ { tags = $2; gsub(/[\[\] ]/, "", tags) }
in_front && /^tags:/ { tags = $2; gsub(/[][ ]/, "", tags) }
!in_front && /^# / && title == "" { title = substr($0, 3) }
function has_tag(tags_str, tag, i, n, arr) {
n = split(tags_str, arr, ",")
Expand Down Expand Up @@ -858,10 +858,10 @@ cmd_blocked() {
in_front && /^status:/ { status = $2 }
in_front && /^priority:/ { priority = $2 }
in_front && /^assignee:/ { assignee = $2 }
in_front && /^tags:/ { tags = $2; gsub(/[\[\] ]/, "", tags) }
in_front && /^tags:/ { tags = $2; gsub(/[][ ]/, "", tags) }
in_front && /^deps:/ {
deps = $2
gsub(/[\[\] ]/, "", deps)
gsub(/[][ ]/, "", deps)
}
!in_front && /^# / && title == "" { title = substr($0, 3) }
function has_tag(tags_str, tag, i, n, arr) {
Expand Down Expand Up @@ -1028,7 +1028,7 @@ cmd_link() {
}
/^links:/ {
# Parse existing links
gsub(/[\[\]]/, "", $0)
gsub(/[][]/, "", $0)
sub(/^links: */, "", $0)
m = split($0, existing, ", *")
for (i = 1; i <= m; i++) {
Expand Down Expand Up @@ -1140,8 +1140,8 @@ cmd_show() {
/^---$/ { in_front = !in_front; next }
in_front && /^id:/ { id = $2 }
in_front && /^status:/ { status = $2 }
in_front && /^deps:/ { deps = $2; gsub(/[\[\] ]/, "", deps) }
in_front && /^links:/ { links = $2; gsub(/[\[\] ]/, "", links) }
in_front && /^deps:/ { deps = $2; gsub(/[][ ]/, "", deps) }
in_front && /^links:/ { links = $2; gsub(/[][ ]/, "", links) }
in_front && /^parent:/ { parent = $2 }
!in_front && /^# / && title == "" { title = substr($0, 3) }

Expand Down