Commit Graph

8 Commits (f7c49698af5958cfbab991325beb8a92141fb023)

Author SHA1 Message Date
nirenjan 45044ab177 Add command_not_found completion to zsh 2023-06-05 08:55:47 -07:00
nirenjan 4497e4e3b1 Use command -v to check for presence of a command
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.
2020-09-09 07:50:13 -07:00
nirenjan a866ab7d4e Wrap gpg snippet to ensure that the command is available 2020-09-09 07:49:26 -07:00
nirenjan 9da5e26220 Get SSH_AUTH_SOCK from gpgconf
Older versions of GPG don't support the `agent-ssh-socket` option, so we
will have to work around this.
2020-04-12 16:57:52 -07:00
nirenjan b712bc45dd Add virtualenv to prompt, if it exists
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.
2019-02-25 20:55:07 -08:00
nirenjan 63656f9fc2 Always (re)set LS_COLORS
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.
2018-11-12 21:16:57 -08:00
nirenjan 5acbda2aeb Move alias for ls into lscolors.zsh
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.
2018-10-23 22:21:19 -07:00
nirenjan 8f9698bf75 Add Zsh config files
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.
2018-10-19 15:45:51 -07:00