File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ new_tmp_dir() {
1111
1212run_command () {
1313 echo " \$ $@ "
14- eval " $@ "
14+ # `bash` often resets $COLUMNS, so we also
15+ # allow $RUN_COMMAND_COLUMNS
16+ COLUMNS=${RUN_COMMAND_COLUMNS-${COLUMNS-80} } eval " $@ "
1517}
1618
1719run_command_allow_broken_pipe () {
Original file line number Diff line number Diff line change @@ -25,6 +25,15 @@ which convert > /dev/null \
2525echo " jj --version: (set PATH to change)"
2626jj --version
2727
28+ # Make `jj` wrap text as opposed to `term-transcript`. `term-transcript` wraps
29+ # at 80 columns. Also, 80 seems to be the maximum number of columns that's
30+ # somewhat readable on mobile devices.
31+ #
32+ # Note that `bash` likes to reset the value of $COLUMNS, so we use a different
33+ # variable here that is interpreted by `run_command()` in `helpers.sh`.
34+ RUN_COMMAND_COLUMNS=80
35+ export RUN_COMMAND_COLUMNS
36+
2837run_script_through_term_transcript_and_pipe_result_to_stderr () {
2938 script=" $1 "
3039 script_base=" ${script% .sh} "
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ username = "jjfan"
1717[ui]
1818color="always"
1919paginate="never"
20+ log-word-wrap=true # Need to set COLUMNS for this to work
2021EOF
2122
2223GIT_CONFIG_GLOBAL=$( mktemp --tmpdir gitconfig-XXXX)
You can’t perform that action at this time.
0 commit comments