Skip to content

Commit 65dc689

Browse files
authored
Use ~/.temporal/config.yml as default config path (#6)
1 parent 3cb5ac1 commit 65dc689

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# temporalctx
22

3-
An oh-my-zsh plugin for switching Temporal contexts (`~/.temporal/config`) similar to `kubectx`.
3+
An oh-my-zsh plugin for switching Temporal contexts (`~/.temporal/config.yml`) similar to `kubectx`.
44

55
## Commands
66

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ else
5656
fi
5757
fi
5858

59-
config_file="${TEMPORAL_CONFIG:-$HOME/.temporal/config}"
59+
config_file="${TEMPORAL_CONFIG:-$HOME/.temporal/config.yml}"
6060
mkdir -p "$(dirname "$config_file")"
6161
if [[ ! -f "$config_file" ]]; then
6262
cat > "$config_file" <<'YAML'

temporalctx.plugin.zsh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# temporalctx oh-my-zsh plugin
2-
# Switch between Temporal contexts defined in ~/.temporal/config.
2+
# Switch between Temporal contexts defined in ~/.temporal/config.yml.
33

44
_temporalctx_config_file() {
55
if [[ -n "$TEMPORAL_CONFIG" ]]; then
66
print -r -- "$TEMPORAL_CONFIG"
77
else
8-
print -r -- "$HOME/.temporal/config"
8+
print -r -- "$HOME/.temporal/config.yml"
99
fi
1010
}
1111

tests/install_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ custom1="$tmp_root/custom1"
3232
mkdir -p "$home1" "$custom1"
3333
PATH="$tmp_root/bin:$PATH" HOME="$home1" ZSH_CUSTOM="$custom1" "$REPO_ROOT/install.sh" >"$tmp_root/install1.out" 2>"$tmp_root/install1.err"
3434
[[ -L "$custom1/plugins/temporalctx" || -d "$custom1/plugins/temporalctx/.git" ]] || fail "default install should target ZSH_CUSTOM/plugins/temporalctx"
35-
[[ -f "$home1/.temporal/config" ]] || fail "installer should create default config"
35+
[[ -f "$home1/.temporal/config.yml" ]] || fail "installer should create default config"
3636
log "case passed: default target"
3737

3838
# Test: custom target dir appends /temporalctx when needed.

0 commit comments

Comments
 (0)