From 6effe837cfa38fb651285367de9153afe2d4ee5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Mon, 9 Sep 2024 18:03:17 +0200 Subject: [PATCH] Sort output of `mob config` --- README.md | 34 ++++++++++++++++---------------- configuration/configuration.go | 36 +++++++++++++++++----------------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 0373baf..9a28121 100644 --- a/README.md +++ b/README.md @@ -380,30 +380,30 @@ Show your current configuration with `mob config`: ```toml MOB_CLI_NAME="mob" -MOB_REMOTE_NAME="origin" -MOB_WIP_COMMIT_MESSAGE="mob next [ci-skip] [ci skip] [skip ci]" -MOB_START_COMMIT_MESSAGE="mob start [ci-skip] [ci skip] [skip ci]" -MOB_SKIP_CI_PUSH_OPTION_ENABLED=true +MOB_DONE_SQUASH=squash MOB_GIT_HOOKS_ENABLED=false -MOB_REQUIRE_COMMIT_MESSAGE=false -MOB_VOICE_COMMAND="say \"%s\"" -MOB_VOICE_MESSAGE="mob next" +MOB_NEXT_STAY=true MOB_NOTIFY_COMMAND="/usr/bin/osascript -e 'display notification \"%s\"'" MOB_NOTIFY_MESSAGE="mob next" -MOB_NEXT_STAY=true +MOB_OPEN_COMMAND="idea %s" +MOB_REMOTE_NAME="origin" +MOB_REQUIRE_COMMIT_MESSAGE=false +MOB_SKIP_CI_PUSH_OPTION_ENABLED=true +MOB_START_COMMIT_MESSAGE="mob start [ci-skip] [ci skip] [skip ci]" MOB_START_CREATE=false MOB_STASH_NAME="mob-stash-name" -MOB_WIP_BRANCH_QUALIFIER="" -MOB_WIP_BRANCH_QUALIFIER_SEPARATOR="-" -MOB_WIP_BRANCH_PREFIX="mob/" -MOB_DONE_SQUASH=squash -MOB_OPEN_COMMAND="idea %s" -MOB_TIMER="" -MOB_TIMER_ROOM="mob" -MOB_TIMER_ROOM_USE_WIP_BRANCH_QUALIFIER=false MOB_TIMER_LOCAL=true -MOB_TIMER_USER="sh" +MOB_TIMER_ROOM_USE_WIP_BRANCH_QUALIFIER=false +MOB_TIMER_ROOM="mob" MOB_TIMER_URL="https://timer.mob.sh/" +MOB_TIMER_USER="sh" +MOB_TIMER="" +MOB_VOICE_COMMAND="say \"%s\"" +MOB_VOICE_MESSAGE="mob next" +MOB_WIP_BRANCH_PREFIX="mob/" +MOB_WIP_BRANCH_QUALIFIER_SEPARATOR="-" +MOB_WIP_BRANCH_QUALIFIER="" +MOB_WIP_COMMIT_MESSAGE="mob next [ci-skip] [ci skip] [skip ci]" ``` Override default value permanently via a `.mob` file in your user home or in your git project repository root. (recommended) diff --git a/configuration/configuration.go b/configuration/configuration.go index 2533b1c..de01c33 100644 --- a/configuration/configuration.go +++ b/configuration/configuration.go @@ -73,30 +73,30 @@ func (c Configuration) IsOpenCommandGiven() bool { func Config(c Configuration) { say.Say("MOB_CLI_NAME" + "=" + quote(c.CliName)) - say.Say("MOB_REMOTE_NAME" + "=" + quote(c.RemoteName)) - say.Say("MOB_WIP_COMMIT_MESSAGE" + "=" + quote(c.WipCommitMessage)) - say.Say("MOB_START_COMMIT_MESSAGE" + "=" + quote(c.StartCommitMessage)) - say.Say("MOB_SKIP_CI_PUSH_OPTION_ENABLED" + "=" + strconv.FormatBool(c.SkipCiPushOptionEnabled)) + say.Say("MOB_DONE_SQUASH" + "=" + string(c.DoneSquash)) say.Say("MOB_GIT_HOOKS_ENABLED" + "=" + strconv.FormatBool(c.GitHooksEnabled)) - say.Say("MOB_REQUIRE_COMMIT_MESSAGE" + "=" + strconv.FormatBool(c.RequireCommitMessage)) - say.Say("MOB_VOICE_COMMAND" + "=" + quote(c.VoiceCommand)) - say.Say("MOB_VOICE_MESSAGE" + "=" + quote(c.VoiceMessage)) + say.Say("MOB_NEXT_STAY" + "=" + strconv.FormatBool(c.NextStay)) say.Say("MOB_NOTIFY_COMMAND" + "=" + quote(c.NotifyCommand)) say.Say("MOB_NOTIFY_MESSAGE" + "=" + quote(c.NotifyMessage)) - say.Say("MOB_NEXT_STAY" + "=" + strconv.FormatBool(c.NextStay)) - say.Say("MOB_STASH_NAME" + "=" + quote(c.StashName)) - say.Say("MOB_WIP_BRANCH_QUALIFIER" + "=" + quote(c.WipBranchQualifier)) - say.Say("MOB_WIP_BRANCH_QUALIFIER_SEPARATOR" + "=" + quote(c.WipBranchQualifierSeparator)) - say.Say("MOB_WIP_BRANCH_PREFIX" + "=" + quote(c.WipBranchPrefix)) - say.Say("MOB_DONE_SQUASH" + "=" + string(c.DoneSquash)) say.Say("MOB_OPEN_COMMAND" + "=" + quote(c.OpenCommand)) - say.Say("MOB_TIMER" + "=" + quote(c.Timer)) - say.Say("MOB_TIMER_ROOM" + "=" + quote(c.TimerRoom)) - say.Say("MOB_TIMER_ROOM_USE_WIP_BRANCH_QUALIFIER" + "=" + strconv.FormatBool(c.TimerRoomUseWipBranchQualifier)) + say.Say("MOB_REMOTE_NAME" + "=" + quote(c.RemoteName)) + say.Say("MOB_REQUIRE_COMMIT_MESSAGE" + "=" + strconv.FormatBool(c.RequireCommitMessage)) + say.Say("MOB_SKIP_CI_PUSH_OPTION_ENABLED" + "=" + strconv.FormatBool(c.SkipCiPushOptionEnabled)) + say.Say("MOB_START_COMMIT_MESSAGE" + "=" + quote(c.StartCommitMessage)) + say.Say("MOB_STASH_NAME" + "=" + quote(c.StashName)) + say.Say("MOB_TIMER_INSECURE" + "=" + strconv.FormatBool(c.TimerInsecure)) say.Say("MOB_TIMER_LOCAL" + "=" + strconv.FormatBool(c.TimerLocal)) - say.Say("MOB_TIMER_USER" + "=" + quote(c.TimerUser)) + say.Say("MOB_TIMER_ROOM_USE_WIP_BRANCH_QUALIFIER" + "=" + strconv.FormatBool(c.TimerRoomUseWipBranchQualifier)) + say.Say("MOB_TIMER_ROOM" + "=" + quote(c.TimerRoom)) say.Say("MOB_TIMER_URL" + "=" + quote(c.TimerUrl)) - say.Say("MOB_TIMER_INSECURE" + "=" + strconv.FormatBool(c.TimerInsecure)) + say.Say("MOB_TIMER_USER" + "=" + quote(c.TimerUser)) + say.Say("MOB_TIMER" + "=" + quote(c.Timer)) + say.Say("MOB_VOICE_COMMAND" + "=" + quote(c.VoiceCommand)) + say.Say("MOB_VOICE_MESSAGE" + "=" + quote(c.VoiceMessage)) + say.Say("MOB_WIP_BRANCH_PREFIX" + "=" + quote(c.WipBranchPrefix)) + say.Say("MOB_WIP_BRANCH_QUALIFIER_SEPARATOR" + "=" + quote(c.WipBranchQualifierSeparator)) + say.Say("MOB_WIP_BRANCH_QUALIFIER" + "=" + quote(c.WipBranchQualifier)) + say.Say("MOB_WIP_COMMIT_MESSAGE" + "=" + quote(c.WipCommitMessage)) } func ReadConfiguration(gitRootDir string) Configuration {