After fixing the macOS `/etc/zprofile` issue rewriting the `PATH`
environment variable it is no longer necessary to explicitly add
`/usr/local/opt/python/libexec/bin` to `PATH` since Homebrew installed
python 2.x is installed in `/usr/local/bin` and is used by default.
macOS is obnoxious and overwrites the PATH from a users ~/.zshenv, which is
sourced first, in /etc/zprofile by calling `/usr/libexec/path_helper -s` so
this is required so that PATH is once again set to the desired value.
Update the build-dir shell function to usage zcurses instead of the
Python pick package to interactively select build directories, this
results in a more responsive user experience. Add argument parsing to
handle various use cases. Add prompt when the build command for the
selected build directory could not be detected, allowing the user to
specify the desired build command.
```
usage: build-dir [-h] [--build] [<directory>]
Find and select the current build directory interactively.
positional arguments:
<directory> the build directory to select
optional arguments:
-h, --help show this help message and exit
--build invoke a build after selection
```
* `build` is an alias which on first use invokes `build-dir --build` to
select a build directory, reconfigure the `build` alias, and invoke
the `build` alias on the selected build directory.
* `debug` is an alias to the installed system native debugger.
* `build-dir` is a function to select a build directory by reconfiguring
the `build` alias, it detects `build.ninja` or `Makefile` in the build
directory and selects the appropriate `ninja` or `make` command.
Depends on the `build-dir.py` Python script which uses the `pick`
package to interactively select the build directory.
* `build-run` is a function which builds the specified target then
attempts to run it, making the assumption it resides in the `bin`
subdirectory of the build directory.
* `build-debug` is a function which build the specified tared then
attempts to debug it using the system native debugger, making the
assumption it resides in the `bin` subdirectory of the build
directory.
usage: autoenv [-h] {init,edit,deinit}
options:
-h, --help show this help message and exit
commands:
init add .enter and .exit scripts in current directory
edit edit .enter and .exit scripts in current directory
deinit remove .enter and .exit scripts in current directory
Fixes#9.
Add ccache symlink directory to start of PATH, this must be after
`typeset -U PATH` because on macOS this reorders the list so ccache's
symlinks will no longer be at the start of PATH rendering it unusable.
From experimenting `unsetopt flow_control` seems to only disable flow
control for Zsh itself, not for child processes like Vim. To fix the
issue also call `stty -ixon` to disable flow control completely.
Fixes#8
* Add option parsing to `prompt_fresh_setup` to detect when options are
set during setup.
* Add `-a` option to enable almostontop behaviour, every time a command
is invoked the screen is cleared and the is prompt redrawn before the
command begins using the `preexec` hook. `-a` is disabled by default.
* Add `prompt_fresh_help` function to display a description of available
options using `prompt -h fresh`.
* Canonicalize all utility functions for the fresh prompt theme to
follow the `fresh_<name>` convention.
Fixes#1.
Depends on setting the following in `.tmux.conf`:
set -ga terminal-overrides '*:Ss=\E]1337;CursorShape=%p1%d\7'
This allows changing the iTerm2 cursor shape using the same escape
sequences as used for VTE compatible terminals.
Sending escape sequences directly from zsh and bypassing tmux results in
the wrong cursor shape when switching between panes which no longer
reflect the current zsh vi mode.
When using ZTE compatible terminals tmux supports tracking cursor shape
changes on a per pane basis using a suitable `terminal-override`, this
allows zsh and vim to behave as if they are not operating in tmux and
everything works as expected. However, so far I've not been able to
reproduce this behaviour in iTerm2.