grml-etc-core.git
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

8 years agozshrc: Add a setting to avoid the persistent dirstack feature to be activated
Frank Terbeck [Sat, 23 Jan 2016 14:46:20 +0000 (15:46 +0100)]
zshrc: Add a setting to avoid the persistent dirstack feature to be activated

Apparently, there are still problems with automounters and slow/buggy
network file systems. This style makes it possible to disable the
feature altogether.

8 years agozshrc: Make the default of 'filter-on-load' match docs
Frank Terbeck [Sat, 23 Jan 2016 14:42:29 +0000 (15:42 +0100)]
zshrc: Make the default of 'filter-on-load' match docs

8 years agozshrc: test if ls is GNU ls instead of islinux()
Moviuro [Sun, 17 Jan 2016 06:45:23 +0000 (07:45 +0100)]
zshrc: test if ls is GNU ls instead of islinux()

8 years agozshrc: add the islinux() test before testing for ls -v switch
Moviuro [Fri, 15 Jan 2016 06:35:14 +0000 (07:35 +0100)]
zshrc: add the islinux() test before testing for ls -v switch

See https://github.com/grml/grml-etc-core/pull/55#issuecomment-171782089

8 years agozshrc: Add comments about the ls_ and grep_options we set
Moviuro [Thu, 14 Jan 2016 20:57:41 +0000 (21:57 +0100)]
zshrc: Add comments about the ls_ and grep_options we set

8 years agozshrc: Enable ls(1)'s natural sorting if available
Moviuro [Thu, 14 Jan 2016 20:56:50 +0000 (21:56 +0100)]
zshrc: Enable ls(1)'s natural sorting if available

8 years agoRelease new version 0.12.5 v0.12.5
Michael Prokop [Tue, 5 Jan 2016 21:44:56 +0000 (22:44 +0100)]
Release new version 0.12.5

8 years agoSync to zsh-lookup upstream repository
Frank Terbeck [Tue, 5 Jan 2016 17:16:24 +0000 (18:16 +0100)]
Sync to zsh-lookup upstream repository

This fixes a bunch of warnings with zsh's new warn_create_global
behaviour.

8 years agoSwitch screenrc_* to UTF8 encoding
Michael Prokop [Mon, 30 Nov 2015 13:26:39 +0000 (14:26 +0100)]
Switch screenrc_* to UTF8 encoding

Hello 2015, 2016 is looking around the corner.

8 years agotmux: remove obsolete mouse-select-pane option
Sebastian Boehm [Tue, 3 Nov 2015 16:27:41 +0000 (17:27 +0100)]
tmux: remove obsolete mouse-select-pane option

8 years agoRelease new version 0.12.4 v0.12.4
Michael Prokop [Wed, 21 Oct 2015 21:23:18 +0000 (23:23 +0200)]
Release new version 0.12.4

8 years agozshrc: Remove unused parameter $ZSHDIR
Frank Terbeck [Fri, 9 Oct 2015 14:17:32 +0000 (16:17 +0200)]
zshrc: Remove unused parameter $ZSHDIR

It was only used with the previous cache setup. The new setup
now uses ${ZDOTDIR:-$HOME} like everything else in the zshrc does.

Signed-off-by: Frank Terbeck <ft@grml.org>
8 years agozshrc: Add more robustness to completion caching setup [Closes: issue1933]
Frank Terbeck [Fri, 9 Oct 2015 14:16:16 +0000 (16:16 +0200)]
zshrc: Add more robustness to completion caching setup [Closes: issue1933]

This is based on a suggestion by Thilo Six <tech@xk2c.de>.

The setup now uses $GRML_COMP_CACHING to decide on whether to configure
caching at all and $GRML_COMP_CACHE_DIR to tell where to put the caching
data.

It also makes sure the caching directory actually exists before using it.

See the included documentation for details.

Signed-off-by: Frank Terbeck <ft@grml.org>
8 years agogrmlzshrc.t2t: update docs on screen alias
Dmitri Vereshchagin [Wed, 23 Sep 2015 20:11:00 +0000 (23:11 +0300)]
grmlzshrc.t2t: update docs on screen alias

8 years agozshrc: fix screen alias
Dmitri Vereshchagin [Tue, 22 Sep 2015 05:52:24 +0000 (08:52 +0300)]
zshrc: fix screen alias

- Using `${commands[screen]}' which is expanded in double quotes makes
  it impossible to use custom screen installation or wrapper.  Use
  `screen' instead.

- Screen reads configuration from $HOME/.screenrc by default so it is
  redundant to set alias for this.

8 years agogrmlzshrc.5: Remove documentation for allulimit
Frank Terbeck [Sun, 27 Sep 2015 11:38:11 +0000 (13:38 +0200)]
grmlzshrc.5: Remove documentation for allulimit

8 years agozshrc: Leave all limits alone
Frank Terbeck [Sun, 27 Sep 2015 08:45:35 +0000 (10:45 +0200)]
zshrc: Leave all limits alone

Except for when we're running off of a live medium. In that case still
disable core-dumps. Other than that, it's up to the user to change their
limit settings from the defaults the system provides.

8 years agozshrc: Remove "allulimit" function
Frank Terbeck [Sun, 27 Sep 2015 08:43:01 +0000 (10:43 +0200)]
zshrc: Remove "allulimit" function

It basically does the same thing as the "unlimit" builtin zsh provides.
Just less flexible.

8 years agotmux: background a window, reload config, improve binding
Bernhard Tittelbach [Mon, 7 Sep 2015 22:04:12 +0000 (00:04 +0200)]
tmux: background a window, reload config, improve binding

8 years agozsh: Update Lookup functions from upstream
Frank Terbeck [Fri, 4 Sep 2015 22:01:30 +0000 (00:01 +0200)]
zsh: Update Lookup functions from upstream

This adds the -G option to the gmane backend and fixes a syntax
error in the usenet backend

8 years agoRelease new version 0.12.3 v0.12.3
Michael Prokop [Tue, 11 Aug 2015 10:28:30 +0000 (12:28 +0200)]
Release new version 0.12.3

8 years agozshrc,dirstack: Remove useless test
Frank Terbeck [Tue, 11 Aug 2015 10:07:59 +0000 (12:07 +0200)]
zshrc,dirstack: Remove useless test

At this point, $dirstack is always empty so the test is always true.

8 years agozshrc, dirstack: Avoid chpwd() upon the very first cd calls
Frank Terbeck [Tue, 11 Aug 2015 10:07:22 +0000 (12:07 +0200)]
zshrc, dirstack: Avoid chpwd() upon the very first cd calls

8 years agoRelease new version 0.12.2 v0.12.2
Michael Prokop [Wed, 8 Jul 2015 08:32:10 +0000 (10:32 +0200)]
Release new version 0.12.2

8 years agozshrc: drop 'setopt nonomatch' configuration
Michael Prokop [Fri, 26 Jun 2015 12:27:43 +0000 (14:27 +0200)]
zshrc: drop 'setopt nonomatch' configuration

This is something many experienced Zsh users sometimes complain
about for our config, so let's get this fixed.

The behaviour of 'setopt nonomatch' brings the Zsh behaviour
closer to what Bash does, though people should get used to proper
quoting and get the default Zsh behaviour also with grml-zshrc.

Short explanation for the behaviour of 'setopt nonomatch' by Frank:

| If there's no *.txt in $PWD that command line will not execute with Zsh's default behaviour. You have to quote: "*.txt"
| If there *is* a *.txt file in $PWD, the command will not work as expected: Thus quoting makes the call sane.
| nonomatch makes that expansion as it is done in bash: *.txt => No match? => insert '*.txt'

Short demonstration:

| % setopt nonomatch
| % for f in *.foo ; echo $f
| *.foo
| % setopt nomatch
| % for f in *.foo ; echo $f
| zsh: no matches found: *.foo

The setting is provided as an example in etc/skel/.zshrc now.

Signed-off-by: Michael Prokop <mika@grml.org>
Acked-By: Frank Terbeck <ft@grml.org>
Acked-By: Evgeni Golov <evgeni@grml.org>
8 years agoDocumentation for configuring persistent dirstack filters
Frank Terbeck [Fri, 26 Jun 2015 12:14:33 +0000 (14:14 +0200)]
Documentation for configuring persistent dirstack filters

8 years agoRewrite large parts of persistent dirstack handling
Frank Terbeck [Fri, 26 Jun 2015 12:07:54 +0000 (14:07 +0200)]
Rewrite large parts of persistent dirstack handling

In order to allow filtering what gets committed to the persistent
dirstack, I ended up rewriting the handling altogether.

In order to keep a filtered dirstack, we can't actually derive what gets
saved from $dirstack, unless we'd like to apply the filter to all
entries of the stack each time we're about to save the data to disk.

This uses a new parameter $GRML_PERSISTENT_DIRSTACK, which is our
filtered representation of the actual dirstack.

This code allows for using the same filters after *reading* the saved
dirstack from file while the setup is loading (don't worry, a manual
update with examples is coming up).

On the plus side, this removes the dreaded uprint utility, that we ONLY
used in chpwd when saving dirstack to a file. With this new code, the
GRML_PERSISTENT_DIRSTACK parameter use the -U flag of typeset, which
keeps it unique the whole time.

8 years agoMarking an array for export serves no purpose
Frank Terbeck [Fri, 26 Jun 2015 10:00:14 +0000 (12:00 +0200)]
Marking an array for export serves no purpose

These are remnants of me not completely understanding the way that scope
works in shells. I'll remove these whenever I see them.

8 years agoWeed out non-existing directories when loading DIRSTACKFILE
Frank Terbeck [Fri, 26 Jun 2015 09:38:33 +0000 (11:38 +0200)]
Weed out non-existing directories when loading DIRSTACKFILE

Between saving our persistent dirstack file and loading it in the next
session, directories of which the names we saved might have ceased to
exist. This can cause problems, when the first entry from the saved
dirstack points to a non-existing directory.

Ordinarily, that would not be catastrophic and only lead to an error
message while loading the setup. But if you throw auto-mounters into the
mix, this can cause the setup to hang until the auto-mounter runs into a
timeout.

The proposed fix is to filter out names of non-existing directories
while loading the saved dirstack file.

This leaves the window between loading the file and trying to change to
the first then-existing directory of the file open for the directory to
vanish. That would be tough luck, I guess.

Reported-by: Till Hofmann <hofmanntill@gmail.com>
Signed-off-by: Frank Terbeck <ft@grml.org>
8 years agozshrc: Start/Restart/Stop/... functions: use `service` wrapper if available
Michael Prokop [Wed, 24 Jun 2015 11:09:23 +0000 (13:09 +0200)]
zshrc: Start/Restart/Stop/... functions: use `service` wrapper if available

Instead of directly invoking the init script rely on service(8)
(as shipped by sysvinit-utils) if it's available

8 years agoRelease new version 0.12.1 v0.12.1
Michael Prokop [Tue, 16 Jun 2015 09:11:11 +0000 (11:11 +0200)]
Release new version 0.12.1

8 years agodoc: replace unused $SHELL with zsh
Michael Prokop [Tue, 16 Jun 2015 09:10:32 +0000 (11:10 +0200)]
doc: replace unused $SHELL with zsh

8 years agozshrc: no longer explicitly set SHELL
Michael Prokop [Tue, 16 Jun 2015 09:06:44 +0000 (11:06 +0200)]
zshrc: no longer explicitly set SHELL

This was needed as a workaround for aterm, rxvt,..
Hopefully this isn't needed anymore, instead we're
running into issues like #788819 where an unreachable
$SHELL is causing problems with other tools.

8 years agosll() updated
Thilo Six [Sun, 24 May 2015 19:45:46 +0000 (21:45 +0200)]
sll() updated

* detect symlink loops
* additionaly display details about final link target

Acked-By: Frank Terbeck <ft@grml.org>
8 years agoRelease new version 0.12.0 v0.12.0
Michael Prokop [Fri, 5 Jun 2015 23:44:58 +0000 (01:44 +0200)]
Release new version 0.12.0

8 years agoAdd static version of add-zsh-hook
Frank Terbeck [Fri, 5 Jun 2015 23:09:41 +0000 (01:09 +0200)]
Add static version of add-zsh-hook

This adds a static version of the ‘add-zsh-hook’ function from zsh
upstream. It is included for now to make the setup work with older
versions of zsh (prior to 4.3.7) in which this function had a bug that
triggers annoying errors during shell startup.

This is exactly upstreams code from f0068edb4888a4d8fe94def, with just a
few adjustments in coding style to make the function look more compact.
This definition can be removed as soon as we raise the minimum version
requirement to 4.3.7 or newer.

8 years agozshrc: simplify cdt()
Moviuro [Wed, 3 Jun 2015 21:48:35 +0000 (23:48 +0200)]
zshrc: simplify cdt()

8 years agozshenv: avoid placing empty components in PATH; reorder root's PATH
Dr. András Korn [Mon, 1 Jun 2015 09:12:40 +0000 (11:12 +0200)]
zshenv: avoid placing empty components in PATH; reorder root's PATH

zsh treats an empty PATH component ("::") as ".", which creates a
security hole. Sanitize PATH by explicitly removing empty
components.

As agreed on #grml, root's PATH should also list /usr/local/sbin
and /usr/local/bin before /sbin, /bin, /usr/sbin and /usr/bin;
and there is no harm in adding $HOME/bin unconditionally as the
first PATH component.

8 years agozshrc: add support for `fetch' in simple-extract()
Moviuro [Wed, 22 Apr 2015 22:08:05 +0000 (00:08 +0200)]
zshrc: add support for `fetch' in simple-extract()

`fetch` is FreeBSD's default utility to download things