16 Commits

Author SHA1 Message Date
610cae2f57 Check for tmux session in prompt
Before invoking the `tmux` command to unset the vim pane variable first
check that a `tmux` session exists.
2019-09-05 11:22:47 +01:00
47f821e80a Don't unset tmux option when not in tmux 2019-08-22 21:31:56 +01:00
fcae9e885e Unset the vim navigation flag on prompt redraw
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.
2019-08-16 21:57:33 +01:00
036f0255f8 Improve readability of posix exit codes in prompt 2019-03-13 11:12:37 +00:00
29fb84b995 Disable GCC warning for fread in git-prompt.c 2018-09-12 09:48:44 +01:00
5f2c5b58da Move entire git-prompt to C 2018-09-11 20:56:27 +01:00
6a4531423e Make virtualenv and docker prompt vars local 2018-09-01 10:39:09 +01:00
f24253b8c1 Remove use of RPS1
Following on from the previous commit, use of `RPS1` results in the
prompt being redrawn when the terminal gets narrower, this makes the
line drawn by `fresh_line_one` scroll off the screen. By removing any
use of `RPS1` this behaviour goes away.
2018-08-30 21:57:18 +01:00
df819f58a8 Update fresh prompt
* When a command fails, don't print the error code at the end of the
  first line but directly after the git stats.
* Remove `cr` from `prompt_opts` since there is no longer a new line in
  `PS1`, combined with above, this result in no new lines being inserted
  when the terminal becomes narrower e.g. a horizontal tmux split.
* Remove `fresh_visible_length` function and instead use the length of
  string variables e.g. `${#userhost}`.
2018-08-30 21:04:05 +01:00
31d06e0f19 Add sandbox directory color to fresh_line_one 2018-08-26 15:37:30 +01:00
7653ea6f93 Add -a option to enable almostontop behaviour
* 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.
2018-04-15 16:28:05 +01:00
37480288ae Improve git-prompt compilation error message 2017-11-30 15:45:08 +00:00
85d5d549a5 Add RPS1 support to fresh prompt theme
* Python virtualenv name
* Docker machine name
2017-11-29 15:51:39 +00:00
8438118a87 Add git support to fresh prompt theme 2017-11-28 21:13:17 +00:00
aa4d1ddd85 Add PS2 support to fresh prompt theme 2017-11-22 17:40:47 +00:00
46dff558ab Add (mostly) ported zsh configuration 2017-11-21 18:16:00 +00:00