Skip to content
Merged
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
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,26 @@ jobs:
arch: x86_64
runner: ubuntu-latest
cc: gcc
ldflags: -static

- os: linux
arch: aarch64
runner: ubuntu-latest
cc: aarch64-linux-gnu-gcc
ldflags: -static
cross: true

- os: darwin
arch: x86_64
runner: macos-13
cc: clang
ldflags: ""

- os: darwin
arch: aarch64
runner: macos-14
cc: clang
ldflags: ""

steps:
- name: Checkout code
Expand All @@ -98,7 +102,7 @@ jobs:
run: brew install ragel

- name: Build
run: make CC=${{ matrix.cc }}
run: make CC=${{ matrix.cc }} LDFLAGS="${{ matrix.ldflags }}"

- name: Upload build artifact
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Maintainer: Tobi Lutke <tobi@shopify.com>
pkgname=try-cli
pkgver=1.3.4
pkgver=1.3.5
pkgrel=1
pkgdesc="A fast, interactive CLI tool for managing ephemeral development workspaces"
arch=('x86_64' 'aarch64')
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.4
1.3.5
22 changes: 22 additions & 0 deletions src/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#endif

#include "commands.h"
#include "config.h"
#include "tui.h"
#include "utils.h"
#include <stdio.h>
Expand Down Expand Up @@ -468,6 +469,27 @@ int cmd_exec(int argc, char **argv, const char *tries_path, Mode *mode) {

const char *subcmd = argv[0];

// Handle flags that may be passed through shell wrapper
// (normally handled by main.c, but handle here as fallback)
if (strcmp(subcmd, "--version") == 0 || strcmp(subcmd, "-v") == 0) {
printf("try %s\n", TRY_VERSION);
return 0;
}
if (strcmp(subcmd, "--help") == 0 || strcmp(subcmd, "-h") == 0) {
// Return non-zero to signal shell wrapper to not eval the help output
// (help is printed to stderr by main.c, so we just exit here)
return 1;
}
if (strcmp(subcmd, "--no-colors") == 0) {
zstr_no_colors = true;
// Continue with remaining args
return cmd_exec(argc - 1, argv + 1, tries_path, mode);
}
if (strcmp(subcmd, "--no-expand-tokens") == 0) {
zstr_disable_token_expansion = true;
return cmd_exec(argc - 1, argv + 1, tries_path, mode);
}

if (strcmp(subcmd, "init") == 0) {
// Delegate to init command
cmd_init(argc - 1, argv + 1, tries_path);
Expand Down
Loading