Alexander Barton [Sat, 26 Dec 2020 19:49:51 +0000 (20:49 +0100)]
Split 30_env into "ax-io" and "zshrc" stage
We want it to fix TMPDIR etc. in non-login shells, too! And this makes
sense, as there are some startup sequences (for example when using
screen(1) or tmux(1)) which result in br0ken TMPDIR settings ..
Alexander Barton [Tue, 24 Nov 2020 11:42:50 +0000 (12:42 +0100)]
iterm2: Update integration, add iterm2_clear_captured_output() function
This brings our integration in line with upstream v12 (don't cache the
host name; we simply use $HOST now), fixes some typos, enhances the test
for the iterm2_print_user_vars() function and introduces a ax-zsh
specific new iterm2_clear_captured_output() function.
Alexander Barton [Mon, 24 Aug 2020 08:13:58 +0000 (10:13 +0200)]
history: Make sure HISTFILE is set
Not setting HISTFILE at all disables the history mechanism completely,
so validate this and set HISTFILE, when not done already on the
system-level, for example.
The OSTYPE is "linux-gnu" on AMD64, but it is "linux-gnueabihf" on the
RaspberryPi, for example. So use a regular expression and match for
"^linux-gnu" ...
Alexander Barton [Sat, 21 Mar 2020 13:14:19 +0000 (14:14 +0100)]
Fix axzsh_is_widechar_terminal() logic
axzsh_is_widechar_terminal() returns 0 when the terminal CAN'T display
wiede characters in multiple columns, and non-null, when the terminal
CAN display wide characters.
Alexander Barton [Tue, 31 Dec 2019 15:56:50 +0000 (16:56 +0100)]
axzshctl: Implement "--help" option, and ehnance error handling
Don't exit with an error code ("non-null") when the usage information
was requested with "--help", and write errors parsing the command line
to stderr and exit with code 2.
Alexander Barton [Tue, 31 Dec 2019 15:54:39 +0000 (16:54 +0100)]
axzshctl: Use ax_error to show error messages
This results in error messages to go to stderr.
In addition, suppress the "no theme found" warning message when trying
to enable a remote module as theme. This is expected when it is no
theme, so don't confuse the user.
Alexander Barton [Sat, 28 Dec 2019 22:40:41 +0000 (23:40 +0100)]
axzshctl: Enhance completions, include cloned modules
Use ZSH globbing instead of calling external commands (like ls, cut and
find), and include cloned repositories ("foreign modules") in the
completions, too.
Alexander Barton [Sat, 28 Dec 2019 21:59:48 +0000 (22:59 +0100)]
axzshctl: Enhance activation of "foreign" modules
- Name foreign code "modules", as we don't know yet if it provides a
theme or a plugin.
- Don't enable it as a plugin when a theme is provided (in this case,
enable it as a theme only).
- Check for a theme not only on initial cloning, but on all activations.
Alexander Barton [Sat, 30 Nov 2019 17:39:31 +0000 (18:39 +0100)]
50_completion: Enhance completion styles
- Enable _expand completer.
- Nicer messages using bold and colored text.
- Show secton numbers for manual pages.
- Ignore some more users.
- Set "single-ignored show".
bash_completion: Define dummy function to suppress errors
Define a dummy _init_completion() function, which some bash-completion
scripts do call (for example fail2ban-client ...): this doesn't make the
completion usable, but suppresses error messages at least ...
11_terminal: Set "icon/tab title", not the "window" title
Don't set the "window title" at all (and reset it before showing the
new prompt), and set the "icon title" ("tab title") instead: this gives
a much better experience when using tabs in Terminal.app and iTerm2.app,
especially when mixing tabbed and non-tabbed windows.
Alexander Barton [Mon, 22 Apr 2019 15:45:57 +0000 (17:45 +0200)]
11_terminal: Fix & enhance initialization of FG, BG, FX arrays
This includes support for 16 colors as well as 256 colors.
Other fixes:
- Enhance documentation a little bit.
- Don't use raw ESC codes, use \e instead!
- Remove unneeded %{...%} escaping in spectrum_XXX() functions.
Alexander Barton [Mon, 22 Apr 2019 15:38:33 +0000 (17:38 +0200)]
Fix handling of legacy terminal types
Disable plugins/code requiring current terminal features not only on
"dumb" terminals, but on legacy ("not modern") terminals, too. This is
handled by using the axzsh_is_modern_terminal() function insetad of
axzsh_is_dumb_terminal().
And fix plugins to return 91 ("ignore") as result code in this case.
In addition, disable theming only on dumb terminals (as before), but
fall back to the standard "ax" theme on non-modern terminals, too!