grml-etc-core.git
3 years agoRelease new version 0.17.1 v0.17.1
Michael Prokop [Wed, 27 May 2020 09:21:34 +0000 (11:21 +0200)]
Release new version 0.17.1

3 years agoMerge remote-tracking branch 'origin/github/pr/95'
Michael Prokop [Wed, 27 May 2020 09:14:01 +0000 (11:14 +0200)]
Merge remote-tracking branch 'origin/github/pr/95'

3 years agoMerge remote-tracking branch 'origin/github/pr/97'
Michael Prokop [Wed, 27 May 2020 09:12:38 +0000 (11:12 +0200)]
Merge remote-tracking branch 'origin/github/pr/97'

3 years agoMerge remote-tracking branch 'origin/github/pr/98'
Michael Prokop [Wed, 27 May 2020 09:11:36 +0000 (11:11 +0200)]
Merge remote-tracking branch 'origin/github/pr/98'

3 years agotmux.conf: Fix /etc/tmux.conf:19: unknown key: \\ error message
Darshaka Pathirana [Tue, 26 May 2020 18:28:28 +0000 (20:28 +0200)]
tmux.conf: Fix /etc/tmux.conf:19: unknown key: \\ error message

The previous change (see: c2cbdb01) tried to fix the error
  "unknown key:  confirm-before".

Unfortunately that change only solved the problem for tmux v3.0+.
(Starting a new tmux session and reloading the configuration did not
bring up the error message in the older (<v3.0) tmux versions, so I
wrongly assumed that the change also worked for older versions.)

The changelog ("CHANGES FROM 2.9 to 3.0") states the following:

|  INCOMPATIBLE: tmux's configuration parsing has changed to use yacc(1). There
|  is one incompatible change: a \ on its own must be escaped or quoted as
|  either \\ or '\' (the latter works on older tmux versions).

|  Entirely the same parser is now used for parsing the configuration file
|  and for string commands. This means that constructs previously only
|  available in .tmux.conf, such as %if, can now be used in string commands
|  (for example, those given to if-shell - not commands invoked from the
|  shell, they are still parsed by the shell itself).

This change has been tested (I really hope so!) with the tmux versions
running Debian/jessie (docker), Debian/stretch (docker), Debian/buster
(host system) and Debian/bullseye (Grml daily ISO):

* Debian/jessie: v1.9
* Debian/stretch: v2.3
* Debian/buster: v2.8
* Debian/bullseye: v3.1

Closes (again): grml/grml-etc-core#93

3 years agozshsrc + zshenv: support hostnamectl iff hostname isn't present
Michael Prokop [Tue, 26 May 2020 09:04:40 +0000 (11:04 +0200)]
zshsrc + zshenv: support hostnamectl iff hostname isn't present

The hostname binary doesn't necessarily exist, while hostnamectl
might be available.

Closes: grml/grml-etc-core#96

3 years agoFix darwin battery info field selection
Garrett Holmstrom [Fri, 22 May 2020 06:17:43 +0000 (23:17 -0700)]
Fix darwin battery info field selection

The batterydarwin function looks for the info it wants using field
numbers that are off by one on the current version of Mac OS.  I'm not
sure which version this changed in or what exactly they added (I suspect
it is the battery ID), but this patch makes battery info start working
again.

3 years agoRelease new version 0.17.0 v0.17.0
Michael Prokop [Wed, 20 May 2020 15:25:09 +0000 (17:25 +0200)]
Release new version 0.17.0

3 years agoMerge remote-tracking branch 'origin/github/pr/94'
Michael Prokop [Wed, 20 May 2020 15:22:22 +0000 (17:22 +0200)]
Merge remote-tracking branch 'origin/github/pr/94'

3 years agotmux.conf: Fix unknown key: confirm-before error message
Darshaka Pathirana [Wed, 20 May 2020 14:51:47 +0000 (16:51 +0200)]
tmux.conf: Fix unknown key: confirm-before error message

Quoting the man page tmux(1) of v3.1b:

| Any other characters preceded by \ are replaced by themselves (that is,
| the \ is removed) and are not treated as having any special meaning - so
| for example \; will not mark a command sequence and \$ will not expand
| an environment variable.

and quoting the man page tmux(1) of v2.8:

| Each command should be separated by spaces and a semicolon; commands are
| executed sequentially from left to right and lines ending with a
| backslash continue on to the next line, except when escaped by another
| backslash.  A literal semicolon may be included by escaping it with a
| backslash (for example, when specifying a command sequence to bind-key).

This implies that a backslash should also be escaped by a backslash but
tmux still used to work with the unescaped backslash in older versions.

This change has been tested with the tmux versions running
Debian/jessie, Debian/stretch, Debian/buster and Debian/bullseye
(currently testing):

* Debian/jessie: v1.9
* Debian/stretch: v2.3
* Debian/buster: v2.8
* Debian/bullseye: v3.1

Closes: grml/grml-etc-core#93

3 years agoMerge remote-tracking branch 'origin/github/pr/92'
Michael Prokop [Wed, 20 May 2020 14:24:59 +0000 (16:24 +0200)]
Merge remote-tracking branch 'origin/github/pr/92'

3 years agovimrc: Major rework of the Grml configuration
Darshaka Pathirana [Wed, 20 May 2020 14:02:15 +0000 (16:02 +0200)]
vimrc: Major rework of the Grml configuration

A lot of vimrc configuration options are Grml defaults since the very start of
the project. It is time to clean up as much as possible.

The configuration file (now) clones most of the settings taken from the
defaults.vim file which usually is only loaded if no user vimrc file is found
(see: :help defaults.vim).

The custom Grml configuration was reviewed, fixed and reformatted. The
configuration file should now be more readable and better maintainable.

Include defaults.vim into our Grml configuration:

  We want to take over most of the configuration options defined in
  $VIMRUNTIME/defaults.vim (which is loaded instead the user vimrc file
  (only) if it does not exist / is not found).
  To prevent Vim from loading the defaults.vim again (in case the user
  vimrc file does not exists) we have to set `let g:skip_defaults_vim=1`.

  So we include everything of defaults.vim in our configuration and
  override only single options we do not want. (Currently only `set mouse=`).

  JFTR, in another step we could just source the defaults.vim file and
  override the settings we want to override.

  The background discussion can be found here: https://github.com/grml/grml-etc-core/commit/8cdc0df085211200682699b53e600fcccfe73989

Review and update Grml configuration options. Describe what they do and
why we set them:

'viminfo':

  * Vim default is: `'100,<50,s10,h`
  * `%` means: "When included, save and restore the buffer list. [...] Without
    a number all buffers are stored."
    (Not default, but used to be in our Grml configuration.)
  * `'100` means: "Maximum number of previously edited files for which the
    marks are remembered.
    (Default is `'100`, we should not decrease it to `'50` without reason.)
  * `<100` replaced `\"100`: "Old name of the '<' item, with the disadvantage
    that you need to put a backslash before the ", otherwise it will be recognized
    as the start of a comment!". Means: "Maximum number of lines saved for each
    register."
    (Default is `<50`.)
  * `:100` removed because it shortens the command-line history to 100
    (Default is taken from the option 'history' which defaults to 200 via `defaults.vim`.)
  * `n~/.viminfo` removed because the default name of the viminfo file is
    `"$HOME/.viminfo"` for Unix and OS/2 anyway.
  * `s10` is in Vim default: "Maximum size of an item in Kbyte.  If zero then
    registers are not saved.  Currently only applies to registers.
    (I would not remove the default without a reason.)
  * `h` is Vim default: "Disable the effect of 'hlsearch' when loading the
    viminfo file. When not included, it depends on whether ":nohlsearch" has been
    used since the last search command.
    (Not sure about this option, but I also tend to keep the Vim default.)
  * Source: https://github.com/grml/grml-etc-core/commit/8cdc0df085211200682699b53e600fcccfe73989#r38258350

'linebreak', 'ignorecase':

  * Long lines are not wrapped in the middle of a word.
  * Case is ignored in search patterns.
  * Both seem like good Grml options
  * Source: https://github.com/grml/grml-etc-core/commit/8cdc0df085211200682699b53e600fcccfe73989#r38257095

'comments':

  * Defines how comment lines look like
  * Removed the option because we want to keep the Vim default which includes
    everything the Grml configuration used to have (except for `n:` which made no sense)
  * https://github.com/grml/grml-etc-core/commit/8cdc0df085211200682699b53e600fcccfe73989#r38257448

'dictionary':

  * Used to lookup words for keyword completion with CTRL-X CTRL-K
  * The file '/usr/share/dict/word' does not exist (anymore) so the
    keyword completion was broken.

  | % dpkg -S /usr/share/dict/words
  | diversion by dictionaries-common from: /usr/share/dict/words
  | diversion by dictionaries-common to: /usr/share/dict/words.pre-dictionaries-common
  | wamerican: /usr/share/dict/words

'suffixes':

  * Files with the given suffixes get a lower priority when doing tab completion for file names
  * Vim default is: `.bak,~,.o,.h,.info,.swp,.obj`
  * `.h,.obj` were missing, readded them and changed the order
  * Discussion: https://github.com/grml/grml-etc-core/commit/8cdc0df085211200682699b53e600fcccfe73989#r38258537

'background':

  tl;dr: Removing 'set background=dark' is still a bit controversial
  because it used to "work" and assuming that the user has a dark
  background feels wrong. This setting should go to the personal
  `$HOME/.vimrc[.local]` file.

  Anyway, but it seems like that the Vim background detection
  _sometimes_ does not work so well. *sigh*

  (Vim in the Grml terminal seems to detect the dark background correctly.)

  Quoting the documentation:

  | Vim tries to set the default value according to the terminal used.
  | This will not always be correct.
  | [...]
  | When setting 'background' to the default value with:
  |         :set background&
  | Vim will guess the value.  In the GUI this should work correctly,
  | in other cases Vim might not be able to guess the right value.
  |
  | When the t_RB option is set, Vim will use it to request the background
  | color from the terminal.  If the returned RGB value is dark/light and
  | 'background' is not dark/light, 'background' will be set and the
  | screen is redrawn.  This may have side effects, make t_BG empty in
  | your .vimrc if you suspect this problem.  The response to t_RB can
  | be found in v:termrbgresp.
  | [...]
  | For MS-DOS, Windows and OS/2 the default is "dark".
  | For other systems "dark" is used when 'term' is "linux",
  | "screen.linux", "cygwin" or "putty", or $COLORFGBG suggests a dark
  | background.  Otherwise the default is "light".

  And this it what I observed
  (the current state of the background setting can be queried with ":set background?"):

  * Vim background detection in a **plain** terminal (gnome-terminal) in black-on-white and white-on-black **works**:

    % echo $TERM
    xterm-256color

  * Vim background detection in tmux in a terminal (gnome-terminal) in black-on-white does **not** seem to work:

    % echo $TERM
    screen-256color

  * Vim background detection in GNU/screen in a terminal (gnome-terminal) in black-on-white does **not** seem to work:

    % echo $TERM
    screen.xterm-256color

  Vim was started like this to test the configuration: `vim -c $THIS_VIMRC` (this skips most of the initializations).

  * Discussion: https://github.com/grml/grml-etc-core/commit/8cdc0df085211200682699b53e600fcccfe73989#r38258772

'BufReadPost':

  * When editing a file, always jump to the last known cursor position.
  * This setting was defined twice, decided to keep the default which taken over from defaults.vim
  * Discussion: https://github.com/grml/grml-etc-core/commit/8cdc0df085211200682699b53e600fcccfe73989#r38263223

'mouse':

  * We prefer to disable the mouse usage and use what we're used from older Vim versions.
  * Already defined in this file (overrides the default from defaults.vim)

Put autocommands around the has("autocmd")-block and avoid short name ('au').

And finally make the user aware that using the `$HOME/.vimrc.local` file
might not have the expected result.

Thanks: Michael Prokop (@mika) for the initial work

3 years agoRelease new version 0.16.2 v0.16.2
Michael Prokop [Tue, 12 May 2020 15:10:00 +0000 (17:10 +0200)]
Release new version 0.16.2

3 years agoExecute 'wrap-and-sort -a -t -s' on debian/
Michael Prokop [Tue, 12 May 2020 14:23:10 +0000 (16:23 +0200)]
Execute 'wrap-and-sort -a -t -s' on debian/

This is much better for (code) reviews

3 years agoBump Debian compat version to 12, using debhelper-compat approach
Michael Prokop [Tue, 12 May 2020 14:21:18 +0000 (16:21 +0200)]
Bump Debian compat version to 12, using debhelper-compat approach

Replace dh_clean with dh_prep accordingly.

3 years agoBump Standards-Version to 4.5.0
Michael Prokop [Tue, 12 May 2020 14:20:35 +0000 (16:20 +0200)]
Bump Standards-Version to 4.5.0

3 years agodoc: adjust txt2tags usage for versions >=3.3
Michael Prokop [Tue, 12 May 2020 14:19:33 +0000 (16:19 +0200)]
doc: adjust txt2tags usage for versions >=3.3

1) drop --css-sugar option from txt2tags as it is no longer supported

Quoting from https://sources.debian.org/src/txt2tags/3.4-2/CHANGELOG.md/,
respectively /usr/share/doc/txt2tags/changelog.gz as present in current
Debian/unstable:

| * Always use CSS sugar and drop `--css-sugar` option (Jendrik Seipp).

2) the xhtml target is also gone since v3.3

Quoting the changelog:

| # Version 3.3 (2019-11-04)
|
| * Update html target to HTML5 and drop xhtml target (Jendrik Seipp).

Also see https://github.com/txt2tags/txt2tags regarding v2.7 vs. v3.x

NOTE: the output of txt2tags v2.6-4.1 (as present in Debian/buster) is
not really useable now. We don't depend on txt2tags >=3.4-2 as present
in Debian/unstable though, as we don't use the HTML build output during
the package build.

4 years agoMerge remote-tracking branch 'origin/github/pr/87'
Michael Prokop [Fri, 15 Nov 2019 16:47:40 +0000 (17:47 +0100)]
Merge remote-tracking branch 'origin/github/pr/87'

4 years agozshrc: support PAGER='less -Mr' usage and fall back to vi if LESSOPEN is unset
Michael Prokop [Thu, 14 Nov 2019 15:31:21 +0000 (16:31 +0100)]
zshrc: support PAGER='less -Mr' usage and fall back to vi if LESSOPEN is unset

It's horribly annoying when PAGER is set to less, but lesspipe isn't configured
via LESSOPEN, then `dchange $package` fails with less like this:

% dchange zsh
"/usr/share/doc/zsh/changelog.Debian.gz" may be a binary file.  See it anyway?

vi(m) handles *.gz just fine, so let's try to use vi if PAGER is set to
less and LESSOPEN is unset.

While at it fix usage of ${PAGER} vs ${=PAGER} to also handle
a setting like PAGER='less -Mr' and PAGER=(less -Mr), otherwise
failing with `command not found: less -Mr`.

Thanks: András Korn for review and improvement suggestions

4 years agoMerge remote-tracking branch 'origin/github/pr/88'
Michael Prokop [Thu, 14 Nov 2019 16:30:09 +0000 (17:30 +0100)]
Merge remote-tracking branch 'origin/github/pr/88'

4 years agozsh: commit-to-history: keep escaped character
Doan Tran Cong Danh [Thu, 14 Nov 2019 16:05:16 +0000 (23:05 +0700)]
zsh: commit-to-history: keep escaped character

Prior to this change, when committing this line to history

    echo "hello\"world"

zsh will record this line in history instead:

    echo "hello"world"

because the \" is processed by print.

Correct it by print in raw mode.

Signed-off-by: Doan Tran Cong Danh <congdanhqx@gmail.com>
4 years agoRelease new version 0.16.1 v0.16.1
Michael Prokop [Tue, 22 Oct 2019 14:01:44 +0000 (16:01 +0200)]
Release new version 0.16.1

4 years agoMerge remote-tracking branch 'origin/github/pr/82'
Michael Prokop [Wed, 21 Aug 2019 13:54:31 +0000 (15:54 +0200)]
Merge remote-tracking branch 'origin/github/pr/82'

4 years agozshrc: fix urxvt multi-line issue
cantandwont [Mon, 15 Jul 2019 09:42:36 +0000 (19:42 +1000)]
zshrc: fix urxvt multi-line issue

Quoting from #74:

| When running multiline commands in urxvt, parts of the command are re-echoed.
|
| Example:
|
| me@system ~/foo % ls \
| \`> -l
|
| -ltotal 0
| -rw-r--r-- 1 me users 0 Feb 27 20:36 bar1
| -rw-r--r-- 1 me users 0 Feb 27 20:36 bar2
|
| me@system ~/foo %
|
| Note the '-l' be re-echoed in front of 'total'.

Quoting from zshmisc(1):

| preexec
|
|     Executed just after a command has been read and is about to be
|     executed.  If the history mechanism is active (regardless of
|     whether the line was discarded from the  history  buffer),
|     the string that the user typed is passed as the first
|     argument, otherwise it is an empty string.  The actual command
|     that will be executed (including expanded aliases) is passed
|     in two different forms: the second argument is a
|     single-line, size-limited version of the command (with things
|     like function bodies elided); the third argument contains the
|     full text that is being executed.

Closes: #74

4 years agoMerge remote-tracking branch 'origin/github/pr/77'
Michael Prokop [Wed, 21 Aug 2019 13:30:28 +0000 (15:30 +0200)]
Merge remote-tracking branch 'origin/github/pr/77'

4 years agoMerge remote-tracking branch 'origin/github/pr/84'
Michael Prokop [Fri, 16 Aug 2019 09:03:37 +0000 (11:03 +0200)]
Merge remote-tracking branch 'origin/github/pr/84'

4 years agoscreenrc: Add 'xterm-256color' to terminals
Alexander Dahl [Fri, 16 Aug 2019 07:35:00 +0000 (09:35 +0200)]
screenrc: Add 'xterm-256color' to terminals

KDE's Konsole terminal sets env variable TERM to 'xterm-256color' by
default in newer versions, so the scrollbar fix did not match anymore.

Signed-off-by: Alexander Dahl <post@lespocky.de>
4 years agozshrc: Reset $REPLY parameter before calling prompt token functions
Dmitri Vereshchagin [Sat, 22 Jun 2019 12:09:59 +0000 (15:09 +0300)]
zshrc: Reset $REPLY parameter before calling prompt token functions

It may be tempting to write a prompt token function like this

    if (( ${+commands[kerl]} )) REPLY=$(kerl prompt '<%s> ')

But if the command does not exist user may be end up with duplicated
tokens in her prompt.  Resetting $REPLY parameter before calling
user-defined functions prevents this problem.

4 years agotmux: use foo-style to set status styles
Doan Tran Cong Danh [Fri, 17 May 2019 15:28:10 +0000 (22:28 +0700)]
tmux: use foo-style to set status styles

From tmux 1.9, (20 Feb 2014), foo-{bg,fg,attr} commands have been
deprecated and tmux recommended to use foo-style instead.

Those options have been removed from tmux 2.9

It's more than 5 years from the deprecation of foo-{bg,fg,attr}.
it should be safe to use the new option by now.

Signed-off-by: Doan Tran Cong Danh <congdanhqx@gmail.com>
5 years agoRelease new version 0.16.0 v0.16.0
Michael Prokop [Thu, 21 Mar 2019 11:23:32 +0000 (12:23 +0100)]
Release new version 0.16.0

5 years agoBump Standards-Version to 4.3.0
Michael Prokop [Thu, 21 Mar 2019 11:23:10 +0000 (12:23 +0100)]
Bump Standards-Version to 4.3.0

5 years agozshenv: switch default mount point from /lib/live/mount/medium to /run/live/medium
Michael Prokop [Thu, 21 Mar 2019 09:19:36 +0000 (10:19 +0100)]
zshenv: switch default mount point from /lib/live/mount/medium to /run/live/medium

In commit 0d878d3a679 of live-boot(-grml)
("Simplify mount point handling by using /run/live instead of /lib/live/mount")
the mountpath of /lib/live/mount/medium was moved towards /run/live/medium.

Commit c6a17c7b41b of live-boot(-grml) provides a backward compatibility
rbind mount, but occasionally there seems to be a regression somewhere
during boot (see https://github.com/grml/live-boot-grml/issues/10), and
the rbind mount will be deprecated and removed before the bullseye
(Debian 11) release.

Layout changes over time:

* /cdrom for old linuxrc approach
* /live/image for initramfs layout until December 2012
* /lib/live/mount/medium for initramfs layout since December 2012
* /run/live/medium for initramfs layout since December 2018

5 years agoMerge remote-tracking branch 'origin/github/pr/73'
Michael Prokop [Tue, 12 Feb 2019 14:48:33 +0000 (15:48 +0100)]
Merge remote-tracking branch 'origin/github/pr/73'

C/P from https://github.com/grml/grml-etc-core/pull/73:

| Starting with zsh version 5.1, ZLE began supporting "bracketed paste mode".
|
| Currently, even on dumb terminals, ZLE sometimes emits the escape sequence
| "[?2004h" after the prompt if bracketed paste mode is not disabled. This
| prevents various tools that try to detect a shell prompt (such as Emacs TRAMP)
| from doing so successfully. (The shell prompt effectively becomes user@host ~ %
| �[?2004h – which typically will not be matched by prompt detecting regexps,
| thereby breaking Emacs TRAMP for target hosts that use the Grml zsh config and
| zsh ≥5.1.)
|
| Since most "dumb" terminals do not have bracketed paste capabilities anyway,
| this pull request changes the Grml zsh config to disable bracketed paste mode
| for "dumb" terminals.

5 years agoDisable bracketed paste mode for dumb terminals
Sebastian Boehm [Sun, 13 Jan 2019 19:53:20 +0000 (20:53 +0100)]
Disable bracketed paste mode for dumb terminals

5 years agoRelease new version 0.15.3 v0.15.3
Michael Prokop [Sat, 29 Dec 2018 14:43:13 +0000 (15:43 +0100)]
Release new version 0.15.3

5 years agodoc/grmlzshrc.t2t: replace `apt-get` with `apt`
Michael Prokop [Thu, 20 Dec 2018 15:55:01 +0000 (16:55 +0100)]
doc/grmlzshrc.t2t: replace `apt-get` with `apt`

We recently™ switched from `apt-get` to `apt` (see commits
ecfca5641730b961b6283d825e644ee7cda73805 +
dcba02cdc441315685ddeb2217aaefe35753a906) in several aliases,
adjust documentation accordingly.

5 years agozsh: In grml-small hint at drill instead of dig
Frank Terbeck [Thu, 20 Dec 2018 12:52:53 +0000 (13:52 +0100)]
zsh: In grml-small hint at drill instead of dig

Closes: https://github.com/grml/grml/issues/56

5 years agoRelease new version 0.15.2 v0.15.2
Michael Prokop [Fri, 14 Dec 2018 11:18:32 +0000 (12:18 +0100)]
Release new version 0.15.2

5 years agogrml-lang zsh completion: add dvorak, es, fr, it + jp to list of supported languages
Michael Prokop [Fri, 14 Dec 2018 10:54:43 +0000 (11:54 +0100)]
grml-lang zsh completion: add dvorak, es, fr, it + jp to list of supported languages

Thanks: Christian Haase for the bug report
Closes: https://github.com/grml/grml/issues/108

5 years agoRelease new version 0.15.1 v0.15.1
Michael Prokop [Thu, 15 Nov 2018 08:57:59 +0000 (09:57 +0100)]
Release new version 0.15.1

5 years agoSwitch Homepage + Vcs-Browser headers from http to https
Michael Prokop [Thu, 15 Nov 2018 08:54:48 +0000 (09:54 +0100)]
Switch Homepage + Vcs-Browser headers from http to https

5 years agoBump Standards-Version to 4.2.1
Michael Prokop [Thu, 15 Nov 2018 08:54:30 +0000 (09:54 +0100)]
Bump Standards-Version to 4.2.1

5 years agoAdd a style in order to amend compinit's command line
Frank Terbeck [Sat, 18 Aug 2018 15:10:54 +0000 (17:10 +0200)]
Add a style in order to amend compinit's command line

Includes documentation with a possible usage example.

Closes: Github bugreport #103

5 years agobk(): Remove the separators between the units of time
Darshaka Pathirana [Thu, 14 Jun 2018 14:02:51 +0000 (16:02 +0200)]
bk(): Remove the separators between the units of time

In PR #60 we discussed the use of the local timezone instead of UTC.
While doing so we figured out that the current implementation is broken
on VFAT.

This solution removes the delimiters between the units of time which is fully
IS0 8601 compliant and should work well on all filesystems.

5 years agozshrc: fix default keybinding help
Bernhard Tittelbach [Tue, 19 Jun 2018 13:12:26 +0000 (15:12 +0200)]
zshrc: fix default keybinding help

5 years agoRelease new version 0.15.0 v0.15.0
Michael Prokop [Fri, 1 Jun 2018 14:12:58 +0000 (16:12 +0200)]
Release new version 0.15.0

5 years agoBump Standards-Version to 4.1.4
Michael Prokop [Fri, 1 Jun 2018 14:12:31 +0000 (16:12 +0200)]
Bump Standards-Version to 4.1.4

5 years agoBuild-Depend on debhelper (>= 10~)
Michael Prokop [Fri, 1 Jun 2018 14:12:06 +0000 (16:12 +0200)]
Build-Depend on debhelper (>= 10~)

5 years agoBump debian/compat to 10
Michael Prokop [Fri, 1 Jun 2018 14:11:51 +0000 (16:11 +0200)]
Bump debian/compat to 10

5 years agoMerge remote-tracking branch 'origin/github/pr/55'
Michael Prokop [Fri, 25 May 2018 09:12:40 +0000 (11:12 +0200)]
Merge remote-tracking branch 'origin/github/pr/55'

5 years agozshrc: use `apt` instead of `apt-get` also for search + show
Michael Prokop [Sun, 13 May 2018 08:11:16 +0000 (10:11 +0200)]
zshrc: use `apt` instead of `apt-get` also for search + show

Output of `apt show` and `apt search` is more user-friendly,
so switch to it.

While at it fix description of `au` alias (it's apt and not
apt-get).

6 years agoPartly revert c0a2a4d again
Frank Terbeck [Sat, 30 Dec 2017 10:11:24 +0000 (11:11 +0100)]
Partly revert c0a2a4d again

As it turns out, zsh has defaults on HISTSIZE and SAVEHIST. I have lost track
off zsh defaults a long time ago. This is a reason not to do this at all.
HISTSIZE's default is 30, SAVEHIST's default is 0. And the latter is a big
problem: No history will be saved anymore.

If someone wants different values for these two parameters, they can set them
in .zshrc.local. I am NOT working around this by comparing the actual value to
zsh's defaults.

The combined diff of c0a2a4d and this commit looks like this:

[snip]
--- a/etc/zsh/zshrc
+++ b/etc/zsh/zshrc
@@ -1582,7 +1582,7 @@ function command_not_found_handler () {
 # history

 #v#
-HISTFILE=${ZDOTDIR:-${HOME}}/.zsh_history
+HISTFILE=${HISTFILE:-${ZDOTDIR:-${HOME}}/.zsh_history}
 isgrmlcd && HISTSIZE=500  || HISTSIZE=5000
 isgrmlcd && SAVEHIST=1000 || SAVEHIST=10000 # useful for setopt append_history
[snap]

Closes: Github bugreport #64

6 years agoMake a couple of history parameters adhere to presets
Frank Terbeck [Tue, 28 Nov 2017 20:37:44 +0000 (21:37 +0100)]
Make a couple of history parameters adhere to presets

Requested on IRC, and I don't see why not.

6 years agoFix a bunch of typos
Michael Prokop [Sat, 23 Sep 2017 11:58:58 +0000 (13:58 +0200)]
Fix a bunch of typos

s/Directoy/Directory/
s/Dont/Don't/
s/accross/across/
s/an other/another/
s/completition/completion/
s/directoy/directory/
s/dont/don't/
s/occurence/occurrence/
s/overwriten/overwritten/
s/prefered/preferred/
s/prevously/previously/
s/reenabled/re-enabled/
s/to to/to/
s/whith/with/

6 years agoRelease new version 0.14.3 v0.14.3
Michael Prokop [Thu, 7 Sep 2017 07:50:10 +0000 (09:50 +0200)]
Release new version 0.14.3

6 years agoMove insert-datestamp to "C-x d" from "M-d"
Frank Terbeck [Fri, 18 Aug 2017 12:09:25 +0000 (14:09 +0200)]
Move insert-datestamp to "C-x d" from "M-d"

"M-d" is obviously used in emacs mode by default. The "C-x ..." prefix is used
for other purposes in our setup already and this particular binding is free.

Closes: #62

6 years agoBind insert-datestamp to "ESC d" (Alt-d on many terminals) instead of "Ctrl-e d"
Frank Terbeck [Thu, 20 Jul 2017 21:56:15 +0000 (23:56 +0200)]
Bind insert-datestamp to "ESC d" (Alt-d on many terminals) instead of "Ctrl-e d"

The github issue #62 for the grml-etc-core repository noted a delay with the
default Ctrl-e binding in emacs mode. This is caused by a binding where Ctrl-e
is a prefix. The shells waits for a timeout to figure out if the user wanted
the "Ctrl-e" binding, or or if there's a d coming to complete the "Ctrl-e d"
binding.

Closes: #62

6 years agoRelease new version 0.14.2 v0.14.2
Michael Prokop [Tue, 16 May 2017 13:15:17 +0000 (15:15 +0200)]
Release new version 0.14.2

6 years agoscreenrc: drop keybindings G (google) + H (heise.de)
Michael Prokop [Mon, 15 May 2017 19:47:37 +0000 (21:47 +0200)]
screenrc: drop keybindings G (google) + H (heise.de)

Those vendor specific configs shouldn't be shipped as such,
especially since we overwrite the default log function
(https://www.gnu.org/software/screen/manual/screen.html#Logging)
which defaults to 'H', so conflicting with our HeiseTicker
binding. Therefore remove it.

Thanks: Ralf Moll for reporting

6 years agotmux: drop deprecated status-utf8 option
Michael Prokop [Mon, 15 May 2017 17:58:19 +0000 (19:58 +0200)]
tmux: drop deprecated status-utf8 option

From tmux's FAQ:

| Since the 1.0 release, tmux will turn on UTF-8 related options automatically
| (ie status-utf8, and utf8) if the above conditions are met.

In tmux's upstream there's also:

| commit 1b86f520ea1620628e569ea833c7b13306c18a4e
| Author: nicm <nicm>
| Date:   Thu Nov 12 11:09:11 2015 +0000
|
|     Nuke the utf8 and status-utf8 options and make tmux only a UTF-8
|     terminal. We still support non-UTF-8 terminals outside tmux, but inside
|     it is always UTF-8 (as when the utf8 and status-utf8 options were on).

Starting with tmux v2.2 this option is no longer supported.
While we still have tmux 1.9-6 in Debian/jessie there's at least
a backport of v2.3-4~bpo8+1 available in jessie-backports (and
corresponding v2.3-4 in testing/unstable), so the best we can do
is drop the configuration setting overall.

Thanks: Timo Boettcher for forwarding the bug report

6 years agovimrc: disable mouse usage in all modes, being the default in Vim >=8
Michael Prokop [Tue, 9 May 2017 15:43:57 +0000 (17:43 +0200)]
vimrc: disable mouse usage in all modes, being the default in Vim >=8

People used to Vim seem to expect the existing behavior, so let's
stick what has been present in Vim versions before 8. Otherwise
we get different copy/paste behavior (it e.g. breaks middle-click paste).

6 years agoRelease new version 0.14.1 v0.14.1
Michael Prokop [Fri, 5 May 2017 08:52:52 +0000 (10:52 +0200)]
Release new version 0.14.1

6 years agozshrc: avoid "no matches found: abk[V]" on grml-small systems, fixup
Michael Prokop [Fri, 21 Apr 2017 21:39:23 +0000 (23:39 +0200)]
zshrc: avoid "no matches found: abk[V]" on grml-small systems, fixup

Thanks: Frank Terbeck <ft@grml.org>

6 years agozshrc: avoid "no matches found: abk[V]" on grml-small systems
Michael Prokop [Fri, 21 Apr 2017 20:23:45 +0000 (22:23 +0200)]
zshrc: avoid "no matches found: abk[V]" on grml-small systems

7 years agoprompt_grml: Add documentation for strip-sensitive-characters
Frank Terbeck [Sat, 25 Mar 2017 17:01:32 +0000 (18:01 +0100)]
prompt_grml: Add documentation for strip-sensitive-characters

7 years agoRelease new version 0.14.0 v0.14.0
Michael Prokop [Sat, 25 Mar 2017 16:52:59 +0000 (17:52 +0100)]
Release new version 0.14.0

7 years agoHandle volatile characters in prompts with promptsubst set
Frank Terbeck [Sat, 25 Mar 2017 16:33:27 +0000 (17:33 +0100)]
Handle volatile characters in prompts with promptsubst set

We don't set that option, but users may do it in .zshrc.local or similar.

The issue is that performing expansions on a prompt string is an exploitable
vulnerability, if you do not contol every part the prompt string is made up of.

This is what is demonstrated by

  https://github.com/njhartwell/pw3nage

Per default, the code strips [$`] from a final prompt string, so you can't
really take advantage of prompt subst, even though you have it set. If the
prompt_subst option is not set, the code does not kick in at all.

If you want more control over which parts of the prompt are stripped, so you
can take control of prompt_subst, you can do that as well.  Here's an example
that only strips the data returned from vcs_info:

  zstyle ':prompt:grml:*:items:vcs' strip-sensitive-characters on
  zstyle ':prompt:grml:*:setup' strip-sensitive-characters off

Now you can take advantage of prompt_subst in privately defined tokens (even
though I'd use a token that calls a function callback instead of inserting a
string that relies on prompt_subst — but that's just me).

Reported-by: Joerg Jaspert <joerg@debian.org>
7 years agozshrc: fix space<->tab indention issue for commit ecfca564173
Michael Prokop [Sat, 25 Mar 2017 16:14:53 +0000 (17:14 +0100)]
zshrc: fix space<->tab indention issue for commit ecfca564173

Time to grab a coffee…

7 years agozshrc: use apt for agi/adg/ag/au aliases, fall back to apt-get
Michael Prokop [Sat, 25 Mar 2017 16:11:23 +0000 (17:11 +0100)]
zshrc: use apt for agi/adg/ag/au aliases, fall back to apt-get

apt has colors and a progress bar and is supposed to be a
nice UI, so let's make it our default.

Thanks: Karl Voit for the suggestion

7 years agoTest the correct parameter for non-emptiness
Frank Terbeck [Sun, 5 Feb 2017 20:04:50 +0000 (21:04 +0100)]
Test the correct parameter for non-emptiness

I introduced this myself, when I adjusted Thilo's code.

7 years agoonly try to autoload, when there actually is s.th. to
Thilo Six [Sun, 5 Feb 2017 19:42:57 +0000 (20:42 +0100)]
only try to autoload, when there actually is s.th. to

This fixes a regression introduced today: Only try to autoload, when
there actually is s.th. to autoload otherwise "autoload -U" _prints_ all
functions that were marked for autoloading thus far.

7 years agoreduce unneeded filesystem seeks
Thilo Six [Sun, 5 Feb 2017 14:59:18 +0000 (15:59 +0100)]
reduce unneeded filesystem seeks

it is superflous to check existence of func files with zrcautoload
when they are globbed beforehand.
This way reduce unneeded filesystem seeks.

7 years agosmall fix for sll()
Thilo Six [Sun, 5 Feb 2017 14:10:06 +0000 (15:10 +0100)]
small fix for sll()

* do not pollute dirstack, use 'cd -q'
* create interger vars with defined base

7 years agoalso unset NO_COLOR
Thilo Six [Sun, 5 Feb 2017 13:28:32 +0000 (14:28 +0100)]
also unset NO_COLOR

also unset NO_COLOR, seems to left out

7 years agoadd missing run-help-*
Thilo Six [Sun, 5 Feb 2017 13:16:21 +0000 (14:16 +0100)]
add missing run-help-*

add missing run-help-* functions

7 years agouse function keyword through out the code
Thilo Six [Sun, 5 Feb 2017 11:47:15 +0000 (12:47 +0100)]
use function keyword through out the code

From man zsh:
-----------------------------------------------------------------------
Note also the unhelpful interaction of  aliases  and  function  defini‐
tions:

alias func='noglob func'
func() {
    echo Do something with $*
}

Because  aliases  are expanded in function definitions, this causes the
following command to be executed:

noglob func() {
    echo Do something with $*
}

which defines noglob as well as func as functions with the body  given.
To  avoid this, either quote the name func or use the alternative func‐
tion definition form `function func'.
-----------------------------------------------------------------------

Therefore make use of the function keyword through out the code for
defining shell functions. Also harmonize its usage, where it is used allready.

7 years agofix usage of 'typeset -U'
Thilo Six [Sun, 5 Feb 2017 10:33:15 +0000 (11:33 +0100)]
fix usage of 'typeset -U'

From man zsh:
for variables with shared values  it is  therefore  recommended to set the flag
for all interfaces, e.g. `typeset -U PATH path'.

Otherwise one of them is not unique:
% echo ${parameters[path]}
array-unique-special
% echo ${parameters[PATH]}
scalar-export-special

After:
% echo ${parameters[path]}
array-unique-special
% echo ${parameters[PATH]}
scalar-export-unique-special

Additionally drop a superflous for loop.

7 years agomake location of file .important_commands configurable keeping backward compatibility
Thilo Six [Sat, 10 Oct 2015 13:32:36 +0000 (15:32 +0200)]
make location of file .important_commands configurable keeping backward compatibility

7 years agoRelease new version 0.13.2 v0.13.2
Michael Prokop [Fri, 27 Jan 2017 15:17:32 +0000 (16:17 +0100)]
Release new version 0.13.2

7 years agozshrc: support systems without capacity file in batterylinux() [Closes: issue1333]
Michael Prokop [Fri, 27 Jan 2017 14:18:23 +0000 (15:18 +0100)]
zshrc: support systems without capacity file in batterylinux() [Closes: issue1333]

Thanks: Axel Beckert for the patch

7 years agozshrc: fall back to journalctl with llog + tlog aliases if /var/log/syslog doesn...
Michael Prokop [Fri, 27 Jan 2017 10:28:58 +0000 (11:28 +0100)]
zshrc: fall back to journalctl with llog + tlog aliases if /var/log/syslog doesn't exist

Also don't make them Debian specific, instead just check for syslog
and journalctl.

7 years agoRelease new version 0.13.1 v0.13.1
Michael Prokop [Fri, 13 Jan 2017 15:06:13 +0000 (16:06 +0100)]
Release new version 0.13.1

7 years agolsb-functions: avoid usage of SYSTEMD variable
Michael Prokop [Fri, 13 Jan 2017 15:05:06 +0000 (16:05 +0100)]
lsb-functions: avoid usage of SYSTEMD variable

If we're unsetting the SYSTEMD variable again this
might influence other code which sources lsb-functions.
Since we also have a single usage of systemd in lsb-functions
there's no need to use a variable at all

7 years agoRelease new version 0.13.0 v0.13.0
Michael Prokop [Fri, 13 Jan 2017 13:04:24 +0000 (14:04 +0100)]
Release new version 0.13.0

7 years agoBump debian/compat version to 9
Michael Prokop [Fri, 13 Jan 2017 13:03:02 +0000 (14:03 +0100)]
Bump debian/compat version to 9

7 years agoBump Standards-Version to 3.9.8
Michael Prokop [Fri, 13 Jan 2017 13:02:03 +0000 (14:02 +0100)]
Bump Standards-Version to 3.9.8

7 years agolsb-functions: include support for grml_colors handling
Michael Prokop [Fri, 13 Jan 2017 12:55:06 +0000 (13:55 +0100)]
lsb-functions: include support for grml_colors handling

It's annoying to have the according grml_colors support
in every single script, so instead lets inline this here.

7 years agoSupport systemd-style output via lsb-functions
Michael Prokop [Fri, 13 Jan 2017 12:38:58 +0000 (13:38 +0100)]
Support systemd-style output via lsb-functions

By properly hooking into /etc/grml/lsb-functions
we can get systemd like output without having to
rewrite any further scripts.

Adjust /etc/grml_colors to have same color style
(non-highlighted colors) as systemd iff running
under systemd.

7 years agodoc/grmlzshrc: Document GRML_NO_{APT,SMALL}_ALIASES
Nicolas Braud-Santoni [Thu, 3 Nov 2016 13:27:25 +0000 (14:27 +0100)]
doc/grmlzshrc: Document GRML_NO_{APT,SMALL}_ALIASES

7 years agozshrc: Make ambiguous aliases optional
Nicolas Braud-Santoni [Wed, 24 Feb 2016 14:20:46 +0000 (15:20 +0100)]
zshrc: Make ambiguous aliases optional

7 years agozshrc: do not alias 'mdstat' when /proc/mdstat doesn't exist
Nicolas Braud-Santoni [Wed, 24 Feb 2016 14:15:18 +0000 (15:15 +0100)]
zshrc: do not alias 'mdstat' when /proc/mdstat doesn't exist

7 years agoFix typo in grmlzshrc manual
Frank Terbeck [Fri, 7 Oct 2016 00:06:01 +0000 (02:06 +0200)]
Fix typo in grmlzshrc manual

7 years agozsh: purge: latexfiles
Bernhard Tittelbach [Wed, 13 Jul 2016 01:27:33 +0000 (03:27 +0200)]
zsh: purge: latexfiles

7 years agozsh: purge: c dependency files
Bernhard Tittelbach [Sun, 29 May 2016 13:27:18 +0000 (15:27 +0200)]
zsh: purge: c dependency files

7 years agoClean up fallback prompt code
Frank Terbeck [Fri, 6 May 2016 11:01:01 +0000 (13:01 +0200)]
Clean up fallback prompt code

7 years agozshrc: dirstack: skip for ZSH_SUBSHELL
Daniel Hahler [Wed, 4 May 2016 21:37:16 +0000 (23:37 +0200)]
zshrc: dirstack: skip for ZSH_SUBSHELL

Otherwise `(cd foo)` would add `foo` to the stack, which is probably not
what you would expect.

7 years agoRelease new version 0.12.6 v0.12.6
Michael Prokop [Sat, 30 Apr 2016 21:39:38 +0000 (23:39 +0200)]
Release new version 0.12.6

7 years agoBump Standards-Version to 3.9.7
Michael Prokop [Sat, 30 Apr 2016 21:39:27 +0000 (23:39 +0200)]
Bump Standards-Version to 3.9.7

7 years agozshrc: check_com() fixed and zshified
Thilo Six [Sat, 30 Apr 2016 11:39:05 +0000 (13:39 +0200)]
zshrc: check_com() fixed and zshified

* FIX: in the elif a shift was missing
* MOD: use '(( ${+' instead of '[[ -n ${'
  One thing though: I tried to verify since when Zsh supports that.
  Currently i do not know where to get that from.
* FIX: add -g to help message

8 years agogrmlzshrc.5: Clarify where to set the enable style
Frank Terbeck [Sat, 23 Jan 2016 14:57:51 +0000 (15:57 +0100)]
grmlzshrc.5: Clarify where to set the enable style