I forgot to reindent part of the function after moving the
if (( $+commands[shellcheck] ))
check into the function. Before it was wrapping the function definition.
Wrap lines at 80 columns where appropriate and I had the energy to think
about how/where to wrap.
There are still lines longer than that, which I plan to wrap in the
future. But that is enough for now.
For deleting a word while in the shell, I find it easier/faster to use
emacs bindings or Ctrl-Backspace and backward-kill-word instead of the
vi version.
In tmux, Ctrl-H (same esacape sequnce as Ctrl-Backspace) is used for
switching panes since f11b7fa56545 ("vim,tmux:plugs: Add
`vim-tmux-navigator`"), so I need to use Ctrl-W.
As that is bound to vi-backword-kill-word, rebind it to use the emacs
version.
Display only `user` when not in a remote shell and `user@hostname` when
connected.
Display the content in bold when running with privileges (no SSH & SSH).
Have those three always the furthest right in the `RPROMPT`. Also
reorder them to be in this order (up -> down : left -> right):
- background_jobs
- command_execution_time
- status
Add an alias that switches directories into the repository root, instead
of having the normal `cd` command behave like that.
Sadly this is not possible (AFAIK) with a git alias as that will always
spawn a subshell.
zshcompsys(1):
> The function bashcompinit provides compatibility with bash's
> programmable completion system. When run it will define the functions,
> compgen and complete which correspond to the bash builtins with the
> same names. It will then be possible to use completion specifications
> and functions written for bash.
I wanted to have them standalone in a commit once for better
transparency instead of reapplying them before committing the updated
theme in the last commit:
529c41abcf ("zsh:p10k: Reset to `p10k configure`")
Load only the `man.vim` plugin, nothing else. This should speed up the
startup a bit. It will never be as fast as `less` though, as it loads
the whole file first.
Split up local declarations into definition and declaration to get the
exit code of the command substitution.
With `err_return` the function now aborts early if `$mount_point`
couldn't be set properly.