Commit graph

19 commits

Author SHA1 Message Date
f154046c0a refactor(bash): avoid messing with syntax highlighting
The backslash character in _osc_end was throwing off syntax highlighting
in vim, so I just use the hex code for \ (0x5c) instead.
2020-12-08 01:34:58 +01:00
2c3b574467 feat(bash): disable Homebrew auto update and analytics 2020-12-05 22:24:12 +01:00
6b4f2ecf85 fix(tmux): changing background was ignored by tmux
When moving the configuration files to $XDG_CONFIG_HOME I forgot to
change the line in .bashrc that sources the tmux configuration so bash
was still trying to source ~/.tmux.conf, which no longer exists.

This commit fixes that. Additionally, the color setting code has been
factored out of tmux.conf into tmux-colors.conf (which can be sourced
from bash profile and tmux.conf). This way the rest of the code in
tmux.conf doesn't have to be executed again when changing the background
color.
2020-12-04 18:15:41 +01:00
46936dffa9 refactor(bash): improve handling of terminal colors
This commit cleans up the code a bit and uses rgb:/RR/GG/BB over the not
recommended #RRGGBB format to specify color values.
2020-12-04 14:31:24 +01:00
f2311bddc1 style(bash): describe common terminal control sequences 2020-12-04 13:28:48 +01:00
51e1d65153 [bash] disable shellcheck warning for bash completion files
There is no need to run shellcheck for each completion file when
checking the bash profile.
2020-12-03 18:34:27 +01:00
6c7b29705e [bash] improve PATH manipulation
The previous implementation failed to prevent duplicates if the entry
being added was the only entry already present in the path. The reason
is that it always required a : to be present in order to remove the new
entry before adding it.

The new implementation is clearer and solves that. However, if the new
entry is already present it will be kept where it was, not moved to the
front of the list. This is fine at the moment.
2020-12-03 18:34:23 +01:00
eef6e7d58f [bash] fix shellcheck error SC2166
For details, see:

    https://github.com/koalaman/shellcheck/wiki/SC2166
2020-12-03 18:34:17 +01:00
93cea206a6 [bash] disable shellcheck warnings on macOS PATH fix
SC2123 warns that the PATH variable is being manipulated, but this is
exactly the intention here.

SC1091 warns that /etc/profile cannot be checked. This is fine, as this
file is provided by the platform and there is no need to check it here.
2020-12-03 18:34:05 +01:00
2a19e95ae5 [bash] disable shellcheck warning on VIMINIT
shellcheck(1) is warning that the single quotes prevent the expression
from being expanded. However, this is the desired behavior because this
expression is meant to be interpreted by vim(1), not bash(1).
2020-12-03 18:33:58 +01:00
2a1a30dd9e [bash] fix shellcheck error SC2155
This makes sure the return code of extracting the path from manpath(1)
is not ignored. Also, unset the MANPATH environment variable instead of
just assigning an empty string to it, so that manpath(1) determines a
suitable default hierarchy to search for manual pages.
2020-12-03 18:33:52 +01:00
cf0a08baaf [bash] fix shellcheck error SC1073
The way I was doing the test is incorrect, as [ is the test(1) program
and the shell builtin command is not something it understands. Instead,
I now just let the shell execute `command` and then set the variable if
`brew` is available.
2020-12-03 18:33:45 +01:00
220f9a7122 [bash] fix shellcheck error SC2148
For details, see:

    https://github.com/koalaman/shellcheck/wiki/SC2148
2020-12-03 18:33:32 +01:00
d60dd8a0ab Add back user to bash prompt 2020-03-05 11:14:16 +01:00
0647d72858 Sync bash with master branch 2020-03-04 19:07:50 +01:00
7e59326d1c Prevent bash warning when no completions are installed 2019-11-16 09:32:29 +00:00
1a3b9973c4 Remove $HOME/bin from PATH (use only $HOME/.local/bin) 2019-11-15 22:10:53 +00:00
9758287c0a Fix bash path manipulation 2019-11-15 22:05:26 +00:00
5be5f80179 Add bash role 2019-11-15 17:11:24 +00:00