With a fresh install of zsh on OSX Catalina, the which command returns
text in stdout even if there is no corresponding command. Replacing it
with `command -v` ensures that the test does not give a false positive.
With my starting to get deeper into Python development, I noticed an
issue with the virtualenv, where the current virtualenv was not set on
activation. I traced this to the fact that PS1 is always reset in the
prompt_header function, therefore, I need to add the virtual environment
details into prompt_header
This change checks if the virtual environment is set, if so, it adds the
current virtual environment to the prompt in magenta color.
Prior to this change, if I changed the dircolors configuration and
restarted the shell, it wouldn't reflect in the new shell because of the
check. I'd have to create a new terminal window to get the new colors.
This change eliminates the check for a set LS_COLORS variable and always
calls dircolors.
Having the ls alias default to `ls --color=auto` caused it to break on
OSX, since the version of ls that ships with OSX doesn't support the
`--color` option.
This change moves the alias into lscolors, since we already have a check
for OSX vs non-OSX (in my case, Linux). This allows the alias to work as
expected on Linux, while the environment variable LSCOLORS provides the
coloring option on OSX.
Prior to this change, I was using Bash as the default shell, but I have
now started using Zsh, which has more features.
This change adds the zshrc and related plugin files to source control
and installs them along with the bashrc files. This also updates tmux to
use zsh as the default shell and command.
Prior to this change, I was using older versions of tmux. However, with
recent changes, I have got access to at least tmux version 2.0, which
removes the old mouse-* options and replaces them with a single `mouse`
option.
This change removes the settings for the old mouse-* options and
replaces them with the single mouse option.
Prior to this change, we were setting PS1 manually and having to muck
with the \[, \] pairs for terminal escapes was proving to be too much.
Instead, we moved to using a function used in PROMPT_COMMAND which
displays the user, hostname and directory on one line, followed by the
actual prompt line which displays the git status.
This change forces the SSH agent to use the GPG agent for the
authorization keys. This is used in order to use a smartcard as the
identity for SSH authentication.
Prior to this change, running smartwd in a virtualenv with Python 3 gave
a syntax error due to the script treating `print` as a keyword, rather
than a function.
This change fixes the print to work as a function, and also cleans up
some of the comments and code to better comply with PEP8
This configures Git to use a standard commit template, in order to make
it easier to write better commit messages.
This commit adds a default template, and configures Git to use it as the
default. It also modifies the install script to install the default
template at ~/.git-commit-template. Finally, this adds an extra check to
reapply the committed Git configuration to the global Git config.
It turns out that when tmux was launched with the TERM set to xterm, it
was causing tmux colors to go out of whack. This imports the original
setting from my previous environment which sets the tmux alias to launch
with the TERM set to screen-256color-bce