grml-etc-core.git
8 weeks agoMerge remote-tracking branch 'origin/github/pr/138' master
Michael Prokop [Fri, 25 Mar 2022 15:02:13 +0000 (16:02 +0100)]
Merge remote-tracking branch 'origin/github/pr/138'

8 weeks agoMerge remote-tracking branch 'origin/github/pr/137'
Michael Prokop [Fri, 25 Mar 2022 14:55:19 +0000 (15:55 +0100)]
Merge remote-tracking branch 'origin/github/pr/137'

2 months agoRelease new version 0.19.2 v0.19.2
Michael Prokop [Mon, 21 Mar 2022 15:22:16 +0000 (16:22 +0100)]
Release new version 0.19.2

2 months agotmux.conf: Add bind-key J to join marked pane to active window
Darshaka Pathirana [Fri, 4 Mar 2022 21:42:15 +0000 (22:42 +0100)]
tmux.conf: Add bind-key J to join marked pane to active window

We have "bind-key j" which joins "the last active pane to the currently
active window". This is cool, if you are able to directly jump to the
window where the pane should go to. Old people like me do not remember
the window (number) where they came from and skim around until they find
the window in question, try to remember the window number, jump back and
forth from window with the needed pane and finally "join the last active
pane to the currently active window".

This is a bit cumbersome, but with "bind-key m" it is possible to
mark the pane in question, skim around until one fine the window where
the pane belongs and "join the marked pane to the currently active
window".

2 months agotmux.conf: source user-specific local conf file ~/.tmux.conf.local
Darshaka Pathirana [Fri, 4 Mar 2022 21:15:54 +0000 (22:15 +0100)]
tmux.conf: source user-specific local conf file ~/.tmux.conf.local

To manage a user-specific local configuration file (like in Grml's
'.vimrc.conf' + '.zshrc.conf') we need to source '~/.tmux.conf.local'.

"bind-key R" (Reload Config) does now reload the 'main" config file
'~/.tmux.conf' and the user-specific local configuration file
'~/.tmux.conf.local'.

With 'source-file -q', no error will be returned if the file does not exist.

3 months agodoc: Error out properly when a generator fails
Frank Terbeck [Tue, 8 Feb 2022 19:50:52 +0000 (20:50 +0100)]
doc: Error out properly when a generator fails

In make only timestamps and return values matter. And the shell will create a
file and update its timestamp when it sees an output redirection. No matter if
the program driving the redirected data fails or not.

So even if the first generator run fails, rerunning make will work, with things
looking like they worked out just fine.

This fixes the issue by running the separate steps toward file generation one
by one.

This issue was brought up by Edward E. (cbrt64 on github) in PR#135 on github¹,
including a proof-of-concept implementation, as well as valuable feedback. This
implementation was derived from it. See the pull-request log for details.

¹ https://github.com/grml/grml-etc-core/pull/135

3 months agoRelease new version 0.19.1 v0.19.1
Michael Prokop [Mon, 24 Jan 2022 15:59:47 +0000 (16:59 +0100)]
Release new version 0.19.1

3 months agoMerge remote-tracking branch 'origin/github/pr/134'
Michael Prokop [Mon, 24 Jan 2022 15:58:15 +0000 (16:58 +0100)]
Merge remote-tracking branch 'origin/github/pr/134'

5 months agozshrc: fix ip command coloring
Pásztor János [Tue, 21 Dec 2021 14:44:18 +0000 (15:44 +0100)]
zshrc: fix ip command coloring

The previous version broke auto-completion. With this fix both of them
are working properly.

5 months agoMerge remote-tracking branch 'origin/github/pr/129'
Michael Prokop [Mon, 6 Dec 2021 16:08:04 +0000 (17:08 +0100)]
Merge remote-tracking branch 'origin/github/pr/129'

5 months agozshrc: ignore hosts set to invalid/loopback addresses for $_etc_hosts
Atrate [Sat, 4 Dec 2021 12:22:12 +0000 (13:22 +0100)]
zshrc: ignore hosts set to invalid/loopback addresses for $_etc_hosts

Signed-off-by: Atrate <Atrate@protonmail.com>
5 months agoMerge remote-tracking branch 'origin/github/pr/133'
Michael Prokop [Fri, 3 Dec 2021 12:24:37 +0000 (13:24 +0100)]
Merge remote-tracking branch 'origin/github/pr/133'

5 months agozshrc: make ip touch interface lo only
Christian Hesse [Fri, 3 Dec 2021 12:19:33 +0000 (13:19 +0100)]
zshrc: make ip touch interface lo only

This reduces cpu cycles, but interface `lo` has to be available
for the check to succeed.

5 months agoMerge remote-tracking branch 'origin/github/pr/130'
Michael Prokop [Fri, 3 Dec 2021 09:21:11 +0000 (10:21 +0100)]
Merge remote-tracking branch 'origin/github/pr/130'

5 months agoMerge remote-tracking branch 'origin/github/pr/132'
Michael Prokop [Mon, 29 Nov 2021 10:33:17 +0000 (11:33 +0100)]
Merge remote-tracking branch 'origin/github/pr/132'

5 months agozshrc: do not unconditionally overwrite $COLORTERM
Michael Prokop [Mon, 29 Nov 2021 09:44:16 +0000 (10:44 +0100)]
zshrc: do not unconditionally overwrite $COLORTERM

Some terminal emulators set COLORTERM=truecolor, do not overwrite those.

Closes: #131

6 months agozshrc: add `NOETCHOSTS` parameter
Roman Volosatovs [Mon, 8 Nov 2021 10:53:59 +0000 (11:53 +0100)]
zshrc: add `NOETCHOSTS` parameter

`/etc/hosts` may be used as a denylist for undesired hosts on some systems.
In such usage scenarios the file may be large in size and parsing it may severely
impact shell startup time.

For example, on a system with `/etc/hosts` from https://github.com/StevenBlack/hosts:

```
% cat profile.zsh
#!/usr/bin/env zsh
zmodload zsh/zprof
source ./etc/zsh/zshrc
zprof
```

```
% ./profile.zsh | head -3
num  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)    1        1181.93  1181.93   87.91%   1181.14  1181.14   87.85%  grmlcomp
```

```
% NOETCHOSTS=1 ./profile.zsh | head -3
num  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)    2          79.77    39.88   47.37%     79.77    39.88   47.37%  compaudit
```

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
6 months agoMerge remote-tracking branch 'origin/github/pr/127'
Michael Prokop [Mon, 8 Nov 2021 15:39:47 +0000 (16:39 +0100)]
Merge remote-tracking branch 'origin/github/pr/127'

6 months agozshrc: use ip from iproute2 with color support
Christian Hesse [Wed, 27 Oct 2021 16:31:06 +0000 (18:31 +0200)]
zshrc: use ip from iproute2 with color support

Closes #126

7 months agozshrc: support setting title in foot terminal emulator
Michael Prokop [Mon, 4 Oct 2021 16:44:52 +0000 (18:44 +0200)]
zshrc: support setting title in foot terminal emulator

foot is a fast, lightweight and minimalistic Wayland terminal emulator,
see https://codeberg.org/dnkl/foot

Thanks: Alexander Kobel for the patch

9 months agoMerge remote-tracking branch 'origin/github/pr/124'
Michael Prokop [Mon, 23 Aug 2021 08:42:13 +0000 (10:42 +0200)]
Merge remote-tracking branch 'origin/github/pr/124'

9 months agoremove dependency of hostname[ctl]
Bhoppi Chaw [Mon, 23 Aug 2021 03:09:15 +0000 (11:09 +0800)]
remove dependency of hostname[ctl]

10 months agoRelease new version 0.19.0 v0.19.0
Michael Prokop [Fri, 9 Jul 2021 07:13:26 +0000 (09:13 +0200)]
Release new version 0.19.0

10 months agozshrc: no longer set histignorealldups
Michael Prokop [Fri, 9 Jul 2021 05:48:32 +0000 (07:48 +0200)]
zshrc: no longer set histignorealldups

The histignorealldups option provides a feature, that if a new command
line being added to the history list duplicates an older one, the older
command is removed from the list.

Demonstration:

| root@grml ~ # echo foo
| foo
| root@grml ~ # echo bar
| bar
| root@grml ~ # history -E 0
|     1  9.7.2021 07:48  exec zsh
|     2  9.7.2021 07:48  echo foo
|     3  9.7.2021 07:48  echo bar
| root@grml ~ # echo foo
| foo
| root@grml ~ # history -E 0
|     1  9.7.2021 07:48  exec zsh
|     3  9.7.2021 07:48  echo bar
|     5  9.7.2021 07:48  echo foo

This is certainly useful for several people, like in personal setups.
But especially for system administration tasks it's quite essential,
that the history shows "the full truth", and it's hard to reconstruct
the order of commands that have been executed.

Whoever wants to get the old behavior back, can enable `setopt
histignorealldups` in their personal zshrc.  Provide the according
configuration snippet in /etc/skel/.zshrc instead, and update docs
accordingly.

Closes: grml/grml-etc-core#114

12 months agoMerge remote-tracking branch 'origin/github/pr/119'
Michael Prokop [Wed, 19 May 2021 05:21:29 +0000 (07:21 +0200)]
Merge remote-tracking branch 'origin/github/pr/119'

12 months agozshrc: improve sudo-command-line
a-wing [Tue, 18 May 2021 03:02:31 +0000 (11:02 +0800)]
zshrc: improve sudo-command-line

12 months agozshrc: change sudo-command-line switch 'sudo'
a-wing [Mon, 17 May 2021 14:27:51 +0000 (22:27 +0800)]
zshrc: change sudo-command-line switch 'sudo'

fix add 'sudo' plugin zsh-syntax-highlighting error

16 months agoRelease new version 0.18.0 v0.18.0
Michael Prokop [Fri, 22 Jan 2021 12:29:38 +0000 (13:29 +0100)]
Release new version 0.18.0

16 months agoMerge remote-tracking branch 'origin/github/pr/104'
Michael Prokop [Fri, 22 Jan 2021 11:42:23 +0000 (12:42 +0100)]
Merge remote-tracking branch 'origin/github/pr/104'

16 months agoMerge remote-tracking branch 'origin/github/pr/117'
Michael Prokop [Mon, 18 Jan 2021 16:45:48 +0000 (17:45 +0100)]
Merge remote-tracking branch 'origin/github/pr/117'

16 months agozshrc: add lrzip support for simple-extract()
lunik1 [Thu, 14 Jan 2021 17:54:43 +0000 (17:54 +0000)]
zshrc: add lrzip support for simple-extract()

17 months agoREADME.md: use https everywhere + adjust ordering
Michael Prokop [Fri, 4 Dec 2020 10:13:53 +0000 (11:13 +0100)]
README.md: use https everywhere + adjust ordering

Related to https://github.com/grml/grml-etc-core/pull/115

17 months agoMerge remote-tracking branch 'origin/github/pr/115'
Michael Prokop [Fri, 4 Dec 2020 10:02:30 +0000 (11:02 +0100)]
Merge remote-tracking branch 'origin/github/pr/115'

18 months agoREADME.md: Add tmux.conf to the "most important files" list
Darshaka Pathirana [Tue, 27 Oct 2020 10:34:05 +0000 (11:34 +0100)]
README.md: Add tmux.conf to the "most important files" list

19 months agoDon't print messages when a feature can't be loaded
Frank Terbeck [Sun, 27 Sep 2020 15:13:43 +0000 (17:13 +0200)]
Don't print messages when a feature can't be loaded

Instead record the status of the load and make it possible to query the results
later on. With this to replicate the old behaviour you could put:

  grml_status_features -

into your "~/.zshrc.local".

Fixes: #113

22 months agoRelease new version 0.17.4 v0.17.4
Michael Prokop [Fri, 10 Jul 2020 08:53:57 +0000 (10:53 +0200)]
Release new version 0.17.4

22 months agoMerge remote-tracking branch 'origin/github/pr/110'
Michael Prokop [Sat, 4 Jul 2020 08:26:54 +0000 (10:26 +0200)]
Merge remote-tracking branch 'origin/github/pr/110'

22 months agozshrc: set title in alacritty
Simon Bruder [Sat, 4 Jul 2020 07:14:19 +0000 (09:14 +0200)]
zshrc: set title in alacritty

22 months agoMerge remote-tracking branch 'origin/github/pr/109'
Michael Prokop [Sat, 27 Jun 2020 08:45:00 +0000 (10:45 +0200)]
Merge remote-tracking branch 'origin/github/pr/109'

22 months agozshrc: enable transient_rprompt to fix sad-smiley situation in rprompt
Michael Prokop [Fri, 26 Jun 2020 11:38:55 +0000 (13:38 +0200)]
zshrc: enable transient_rprompt to fix sad-smiley situation in rprompt

This feature got lost in commit 08ab5d9, but nobody really noticed
this until we got annoyed by the sad-smiley on the right sight of the
prompt (rprompt) and wanted to disable the smiley overall. :)

But once the transient_rprompt option is active, the annoying
c/p behavior with the sad-smiley no longer exists, while
the feature is still there.

FTR, the rprompt in the grml prompt can be disabled e.g. with:

  zstyle ':prompt:grml:right:setup' use-rprompt false

Thanks: Frank Terbeck
Closes: grml/grml-etc-core#107

22 months agoRelease new version 0.17.3 v0.17.3
Michael Prokop [Wed, 24 Jun 2020 10:33:44 +0000 (12:33 +0200)]
Release new version 0.17.3

22 months agoMerge remote-tracking branch 'origin/github/pr/106'
Michael Prokop [Wed, 24 Jun 2020 10:33:17 +0000 (12:33 +0200)]
Merge remote-tracking branch 'origin/github/pr/106'

22 months agozshrc: add function grml-remote-support
Darshaka Pathirana [Wed, 24 Jun 2020 10:05:05 +0000 (12:05 +0200)]
zshrc: add function grml-remote-support

Provide a simple way to connect to the running Grml system via tmate
by encoding the tmate ssh session in a QR code which can be scanned and
sent to the remote support side.

23 months agoRelease new version 0.17.2 v0.17.2
Michael Prokop [Wed, 3 Jun 2020 14:52:26 +0000 (16:52 +0200)]
Release new version 0.17.2

23 months agoMerge remote-tracking branch 'origin/github/pr/105'
Michael Prokop [Wed, 3 Jun 2020 14:19:44 +0000 (16:19 +0200)]
Merge remote-tracking branch 'origin/github/pr/105'

23 months agozshrc: rely only on `uname -n` for $HOSTNAME handling
Michael Prokop [Wed, 3 Jun 2020 14:00:13 +0000 (16:00 +0200)]
zshrc: rely only on `uname -n` for $HOSTNAME handling

There's no need to invoke `hostname` or `hostnamectl --static`
when `uname -n` is POSIX.

Thanks: Darshaka Pathirana and Chris Hofstaedtler
Closes: grml/grml-etc-core#100

23 months agozshrc: url-quote-magic depends on bracketed-paste-magic since zsh 5.1
Michael Prokop [Wed, 3 Jun 2020 06:42:38 +0000 (08:42 +0200)]
zshrc: url-quote-magic depends on bracketed-paste-magic since zsh 5.1

url-quote with zsh >=5.1 does no longer work as such, it depends
on bracketed-paste-magic to work as it used to do

See https://github.com/zsh-users/zsh/blob/68405f31a043bdd5bf338eb06688ed3e1f740937/README#L38-L45
and https://archive.zhimingwang.org/blog/2015-09-21-zsh-51-and-bracketed-paste.html#update
and https://github.com/sorin-ionescu/prezto/issues/978

Closes: grml/grml-etc-core#85

23 months agoMerge remote-tracking branch 'origin/github/pr/102'
Michael Prokop [Sat, 30 May 2020 07:53:53 +0000 (09:53 +0200)]
Merge remote-tracking branch 'origin/github/pr/102'

23 months agomodified: etc/zsh/zshrc, add zstd support for simple-extract().
ur4t [Sat, 30 May 2020 02:14:29 +0000 (10:14 +0800)]
modified: etc/zsh/zshrc, add zstd support for simple-extract().

23 months agoMerge remote-tracking branch 'origin/github/pr/101'
Michael Prokop [Fri, 29 May 2020 12:20:50 +0000 (14:20 +0200)]
Merge remote-tracking branch 'origin/github/pr/101'

23 months agovimrc: support vim-tiny and older versions of vim
Michael Prokop [Wed, 27 May 2020 11:41:13 +0000 (13:41 +0200)]
vimrc: support vim-tiny and older versions of vim

If vim-tiny is present (lacking +eval feature, see `vim --version`),
then invoking vim fails with:

| Error detected while processing /usr/share/vim/vimrc:
| line   30:
| E319: Sorry, the command is not available in this version: let g:skip_defaults_vim=1

The file /usr/share/vim/vimrc is a symlink to /etc/vim/vimrc:

| % ls -la /usr/share/vim/vimrc
| lrwxrwxrwx 1 root root 14 May 12 02:37 /usr/share/vim/vimrc -> /etc/vim/vimrc

So if the eval feature is missing, don't set skip_defaults_vim=1.

Furthermore, on older vim versions we're failing with:

| Error detected while processing /code/etc/vim/vimrc:
| line   61:
| E474: Invalid argument: display=truncate
| line  201:
| E474: Invalid argument: listchars=eol:$,precedes:«,extends:»,tab:»·,trail:·

The "set display=truncate" only works as of patch-7.4.2115 or newer,
see upstream vim.git commit b9a46fec3e79.

The listchars setting only works when running in utf-8 mode,
by default vim-tiny is running in latin1 though.

Closes: grml/grml-etc-core#99

23 months agoMerge remote-tracking branch 'origin/github/pr/100'
Michael Prokop [Thu, 28 May 2020 09:32:23 +0000 (11:32 +0200)]
Merge remote-tracking branch 'origin/github/pr/100'

23 months agozshenv, zshrc: add fallback to uname for HOSTNAME
Moviuro [Thu, 28 May 2020 09:25:20 +0000 (11:25 +0200)]
zshenv, zshrc: add fallback to uname for HOSTNAME

uname -n is POSIX, and should work when neither hostname(1) nor hostnamectl(1)
exist.
Enhances #97

23 months 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

23 months 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'

23 months 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'

23 months 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'

23 months 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

23 months 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

2 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.

2 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

2 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'

2 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

2 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'

2 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

2 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

2 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

2 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.

2 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

2 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.

2 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'

2 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

2 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'

2 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>
2 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

2 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'

2 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

2 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'

2 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'

2 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>
2 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.

3 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>
3 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

3 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

3 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

3 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.

3 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

3 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

3 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.

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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.

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

3 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

3 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