Use arithmetic conditionals for numeric tests in bin
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
f15a91cbe2
commit
d407454511
+2
-2
@@ -151,7 +151,7 @@ plugin_enabled() {
|
||||
[[ -n $id ]] || fail "plugin id is required"
|
||||
shift 2
|
||||
|
||||
if [[ $enabled != "true" && $# -gt 0 ]]; then
|
||||
if [[ $enabled != "true" ]] && (( $# > 0 )); then
|
||||
fail "disable does not take placement options"
|
||||
fi
|
||||
|
||||
@@ -165,7 +165,7 @@ plugin_enabled() {
|
||||
result=$(omarchy-shell shell setPluginEnabled "$id" "$enabled") || fail "could not update plugin; is omarchy-shell running?"
|
||||
[[ $result == "ok" ]] || fail "plugin '$id' is not known; run: omarchy plugin rescan"
|
||||
|
||||
if [[ $enabled == "true" && $# -gt 0 ]]; then
|
||||
if [[ $enabled == "true" ]] && (( $# > 0 )); then
|
||||
omarchy-bar-plugin move "$id" "$@"
|
||||
echo "Enabled and moved $id"
|
||||
elif [[ $enabled == "true" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user