diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index db7e32c..9a70b4a 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -16,17 +16,9 @@ jobs: source "$HOME/.cargo/env" cargo build --release shell: bash - - uses: https://code.forgejo.org/actions/upload-artifact@v3 - with: - name: teamspeak-query-lib - path: ${{ github.workspace }}/target/release/teamspeak-query-lib - - uses: https://code.forgejo.org/actions/download-artifact@v3 - with: - name: teamspeak-query-lib - path: /tmp/artifacts - shell: bash - id: copy-ts-control-artificat run: | + cp ${{ github.workspace }}/target/release/teamspeak-query-lib /tmp/artifacts cp ${{ github.workspace }}/ts-control /tmp/artifacts shell: bash - uses: https://code.forgejo.org/actions/forgejo-release@v1 diff --git a/Cargo.lock b/Cargo.lock index c541dfd..0d9a85b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -182,7 +182,7 @@ dependencies = [ [[package]] name = "teamspeak-query-lib" -version = "0.1.5" +version = "0.1.6" dependencies = [ "clap", "serde", diff --git a/Cargo.toml b/Cargo.toml index 78a7388..dfad335 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "teamspeak-query-lib" -version = "0.1.5" +version = "0.1.6" edition = "2021" [dependencies] diff --git a/ts-control b/ts-control index 601bb90..4c89323 100755 --- a/ts-control +++ b/ts-control @@ -46,12 +46,16 @@ _ts_control_fetch() { } _ts_control_single_or_dmenu() { - options=$(echo "$1" | grep "$2") + filter="$2" + if [ "$filter" == "^$" ]; then + filter="" + fi + options=$(echo "$1" | grep "$filter") count=$(echo "$options" | wc -l) if [ "$count" -eq 1 ]; then echo "$options" else - echo "$options" | $DMENU + echo "$1" | $DMENU fi } @@ -90,8 +94,7 @@ handle_ntfy_events() { done } -# Add '$' to $1 to add 'End of line' to the regex for grep -action=$(_ts_control_single_or_dmenu "$actions" "$1$") +action=$(_ts_control_single_or_dmenu "$actions" "^$1$") case $action in "quick")