zsh
and GNU stow
#14
1 changed files with 24 additions and 14 deletions
|
@ -1,4 +1,4 @@
|
||||||
______________________________________________________________________
|
---
|
||||||
|
|
||||||
date: 2025-06-04
|
date: 2025-06-04
|
||||||
title: zsh and GNU stow
|
title: zsh and GNU stow
|
||||||
|
@ -8,7 +8,7 @@ tags:
|
||||||
- linux
|
- linux
|
||||||
- development
|
- development
|
||||||
|
|
||||||
______________________________________________________________________
|
---
|
||||||
|
|
||||||
In [my last post exploring `nvim`](https://blog.mcknight.tech/2025/05/21/nvim/), I mentioned some potential next projects on my agenda.
|
In [my last post exploring `nvim`](https://blog.mcknight.tech/2025/05/21/nvim/), I mentioned some potential next projects on my agenda.
|
||||||
Well, I wasted no time continuing down the path of trying to perfect my shell experience. I very quickly updated my
|
Well, I wasted no time continuing down the path of trying to perfect my shell experience. I very quickly updated my
|
||||||
|
@ -197,31 +197,37 @@ I settled on [Zinit](https://github.com/zdharma-continuum/zinit) as a lightweigh
|
||||||
apparently maintained option.
|
apparently maintained option.
|
||||||
|
|
||||||
#### OMZ extract
|
#### OMZ extract
|
||||||
|
|
||||||
This convenience command lets me extract files without having to remember the syntax for
|
This convenience command lets me extract files without having to remember the syntax for
|
||||||
extracting `.tar.xz`, `.zip`, `.tar.gz`, etc. A simple `extract <file>`
|
extracting `.tar.xz`, `.zip`, `.tar.gz`, etc. A simple `extract <file>`
|
||||||
|
|
||||||
#### OMZ colored-man-pages
|
#### OMZ colored-man-pages
|
||||||
|
|
||||||
This adds some color to man pages which I think makes it a little easier to skim to find
|
This adds some color to man pages which I think makes it a little easier to skim to find
|
||||||
CLI args and section headers. Its not the *best* IMO, but something is better than nothing
|
CLI args and section headers. Its not the *best* IMO, but something is better than nothing
|
||||||
here when trying to skim through what can be pretty dense documentation.
|
here when trying to skim through what can be pretty dense documentation.
|
||||||
|
|
||||||
#### OMZ encode64
|
#### OMZ encode64
|
||||||
|
|
||||||
It isn't every day that I need to get a b64-encoded representation of a string, but its
|
It isn't every day that I need to get a b64-encoded representation of a string, but its
|
||||||
handy to be able to do so quickly and easily.
|
handy to be able to do so quickly and easily.
|
||||||
|
|
||||||
#### OMZ pip
|
#### OMZ pip
|
||||||
|
|
||||||
I like having tab completion for pip. I haven't used it too much yet, but I already see
|
I like having tab completion for pip. I haven't used it too much yet, but I already see
|
||||||
how this will save me from trying to `pip isntall` when I really mean `pip install`. I
|
how this will save me from trying to `pip isntall` when I really mean `pip install`. I
|
||||||
do this more than I'd like to admit. Other than that, its nice to have reminders for the
|
do this more than I'd like to admit. Other than that, its nice to have reminders for the
|
||||||
less commonly used flags.
|
less commonly used flags.
|
||||||
|
|
||||||
#### OMZ sudo
|
#### OMZ sudo
|
||||||
|
|
||||||
The Oh My Zsh sudo plugin adds a convenience keybind (`esc`+`esc`) to prepend `sudo` to
|
The Oh My Zsh sudo plugin adds a convenience keybind (`esc`+`esc`) to prepend `sudo` to
|
||||||
the current command or the previous command if the input is empty. I find this to be
|
the current command or the previous command if the input is empty. I find this to be
|
||||||
convenient as it is fairly common to re-run the previous command with elevated privileges
|
convenient as it is fairly common to re-run the previous command with elevated privileges
|
||||||
or to prepend `sudo` if I forgot to start with that.
|
or to prepend `sudo` if I forgot to start with that.
|
||||||
|
|
||||||
#### zsh-autosuggestions
|
#### zsh-autosuggestions
|
||||||
|
|
||||||
This plugin works much like suggestions in an IDE, providing a suggested command completion
|
This plugin works much like suggestions in an IDE, providing a suggested command completion
|
||||||
that can be filled in with a bound key (I am using `Shift`+`Tab`).
|
that can be filled in with a bound key (I am using `Shift`+`Tab`).
|
||||||
I find this mapping more convenient than the default `->`, since I can reach it without
|
I find this mapping more convenient than the default `->`, since I can reach it without
|
||||||
|
@ -229,12 +235,15 @@ moving my fingers from the home row and it is easy to remember `tab` and `shift`
|
||||||
are both a kind of completion.
|
are both a kind of completion.
|
||||||
|
|
||||||
#### zsh-syntax-highlighting
|
#### zsh-syntax-highlighting
|
||||||
|
|
||||||
This plugin highlights syntax as you type in a command. This clearly identifies unresolved
|
This plugin highlights syntax as you type in a command. This clearly identifies unresolved
|
||||||
commands or files to help catch errors before trying to run an incomplete command. It also
|
commands or files to help catch errors before trying to run an incomplete command. It also
|
||||||
helps to identify un-escaped characters in a quoted string.
|
helps to identify un-escaped characters in a quoted string.
|
||||||
|
|
||||||
### `.zshrc`
|
### `.zshrc`
|
||||||
|
|
||||||
Now that I've explained it in parts, here's my `.zshrc` file in its entirety:
|
Now that I've explained it in parts, here's my `.zshrc` file in its entirety:
|
||||||
|
|
||||||
```
|
```
|
||||||
# Lines configured by zsh-newuser-install
|
# Lines configured by zsh-newuser-install
|
||||||
HISTFILE=~/.histfile
|
HISTFILE=~/.histfile
|
||||||
|
@ -360,6 +369,7 @@ bindkey '^[[Z' autosuggest-accept
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Some notes on `autossh`
|
#### Some notes on `autossh`
|
||||||
|
|
||||||
I have only been using `autossh` for a couple hours at this point, based on internet recommendations
|
I have only been using `autossh` for a couple hours at this point, based on internet recommendations
|
||||||
that it will do better at resuming with `tmux` (via `tmux-resurrect`). Based on initial testing, it
|
that it will do better at resuming with `tmux` (via `tmux-resurrect`). Based on initial testing, it
|
||||||
appears to be working but I don't yet know if it is markedly better than plain `ssh`.
|
appears to be working but I don't yet know if it is markedly better than plain `ssh`.
|
||||||
|
@ -371,6 +381,7 @@ remotes that run a `tmux` session for remote connections and I wouldn't want to
|
||||||
configurations when multiple connections will be attaching the same `tmux` session.
|
configurations when multiple connections will be attaching the same `tmux` session.
|
||||||
|
|
||||||
### Conclusion
|
### Conclusion
|
||||||
|
|
||||||
I don't think my shell configuration will ever be "done", but I've reached a point where I'm
|
I don't think my shell configuration will ever be "done", but I've reached a point where I'm
|
||||||
satisfied for now. GNU `stow` has simplified my dotfile management and made it easier to
|
satisfied for now. GNU `stow` has simplified my dotfile management and made it easier to
|
||||||
manage more configurations as I add tools to my repertoire. I now have `zsh` looking like
|
manage more configurations as I add tools to my repertoire. I now have `zsh` looking like
|
||||||
|
@ -388,4 +399,3 @@ I also still have some [IDE exploration to do](https://blog.mcknight.tech/2025/0
|
||||||
As I spend more time using `nvim`, I am starting to use it more for coding tasks and it may become my primary "IDE".
|
As I spend more time using `nvim`, I am starting to use it more for coding tasks and it may become my primary "IDE".
|
||||||
In any case, I am actively messing with my `nvim` configuration, so I probably have enough thoughts for another post
|
In any case, I am actively messing with my `nvim` configuration, so I probably have enough thoughts for another post
|
||||||
about that.
|
about that.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue