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!
50_prompt: Move VCS prompt styling into VCS plugin
This is required because some 3rd-party themes written for OhMyZsh call
git_prompt_info() directly, and don't use ax_vcs_prompt(), and therefore
havn't had their VCS prefix and postfix shown ...
Don't include theme into the cache, only the "source" command
This was the case earlier on, before moving this logic into ax.zsh,
and is required by some more complex themes like Powerlevel9k (that
fail to find/include some other resource file otherwise ...).
Implement axzshctl function, restarting the current shell
The new axzshctl function, which shadows the axzshctl shell script,
tries to detect when there potentially were changes to the setup and
restarts the running shell in that case, bringing the new configuration
in effect immediately.
Now the user doesn't have to restart his shell manually any more.
Force creating the symlink, overwriting a possibly already existing one.
This prevents us from having no theme link at all, if something goes
wrong ;-)
Alexander Barton [Sun, 11 Feb 2018 10:12:23 +0000 (11:12 +0100)]
Enhance support for remote plugins with embedded themes
Enable a theme in a remote plugins automatically when cloning and
enabling the plugin itself, and add support to enable such themes
using the regular "axzshctl set-theme" command.
Alexander Barton [Mon, 20 Nov 2017 23:28:47 +0000 (00:28 +0100)]
Don't load themes and ext. plugins on "dumb" terminals
These external (and modern?) plugins most probably don't expect such an
unusual old terminal configuration and don't behave well (echo color
sequences, for example). Therefore we DON'T load any external plugins at
all when running on such a terminal: this results in reduced/disabled
functionality, but hopefully in readable output ...
And the same is true for any themes, included or external: we disable
them and fallback to an included very simple but sane default prompt.