Add collection of cursor line immediately after the previous command
completes and use this when calculating the number of lines required to
move the screen in order to display only the latest prompt.
Up till now setting the `-a` flag of the `prompt_fresh_setup` theme
resulted in duplicate prompts being printed to the terminal. The first,
the interactive prompt with syntax highlighting, and a second after a
call to the `clear` command without syntax highlighting. This patch
replaces the old implementation with one which does not use `clear`.
Instead it queries the terminal for the current cursor position, then
uses this to move to the bottom of the terminal, print a number of new
lines to move the stale command output off screen, and finally move
almost back to the top ready for the invoked command to print it's
output.
Interact with the clipboard through the `copy` and `paste` aliases.
`copy` is defined when:
1. An `ssh` connection is detected, using OSC-52.
2. macOS is detected, using `pbcopy`.
3. `xsel` is detected.
`paste` is define when:
1. macOS is detected, using `pbpaste`.
2. `xsel` is detected.
The `python` Homebrew package installs unversioned links to Python 3
executables in `/usr/local/opt/python/libexec/bin`. Add this directory
to the `PATH` environment variable when it's present.
Partially address #13 by adding the `--git <repo>` option to `sandbox
create`. This enables the quick cloning of a remote repository instead
of doing the tedious dance of creating a sandbox, cloning the remote
repo, deleting the sandbox repo them moving the `.git` directory before
doing a `git reset --hard HEAD`.
Additionally, improve the error messages for all `sandbox` commands,
clean up the completions a little, and use a consistent style in the
scripts.
The [zsh-completions](https://github.com/zsh-users/zsh-completions) repo
contains completions for various commands but not all of these are
useful so the `update-completion-links.zsh` script inspects the `PATH`
to determine which of the completions should be symlinked to
`~/.local/share/zsh/site-functions` which resides on the `fpath`.
Make using the `@vim$TMUX_PANE` window flag much more robust by
unsetting it every time the zsh prompt is drawn and setting it again
using a `FocusGained` `autocmd` in vim. This removes the need for the
hacky check for zsh in the conditional defined in the `in_vim` variable.