[Git-commits] [grml/grml-etc-core] 276629: zshrc: New prompt: Add promptsys help (-h) text

Frank Terbeck ft at grml.org
Tue Mar 5 18:25:22 CET 2013


  Branch: refs/heads/master
  Home:   https://github.com/grml/grml-etc-core
  Commit: 27662940e75dc75f2f6cab2c1fe27aef26ba9753
      https://github.com/grml/grml-etc-core/commit/27662940e75dc75f2f6cab2c1fe27aef26ba9753
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: New prompt: Add promptsys help (-h) text

And also, a few required stubs.

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: 6c4346c3c7233655a9448f896ec708e11ce10ae1
      https://github.com/grml/grml-etc-core/commit/6c4346c3c7233655a9448f896ec708e11ce10ae1
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: New prompt: Register prompt theme with promptsys

This requires a little more care, since promptinit only picks up
themes from $fpath; which we don't do. We define the prompt directly
in the zshrc file.

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: b97f20faee295c7cc16f7b32200c96462d65f591
      https://github.com/grml/grml-etc-core/commit/b97f20faee295c7cc16f7b32200c96462d65f591
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: New prompt: Implement the basic grml prompt framework

This actually already implements most of the stuff, that is in
our usual prompt.

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: feb4d463d9c93b7780e5b28dc833a601f93db222
      https://github.com/grml/grml-etc-core/commit/feb4d463d9c93b7780e5b28dc833a601f93db222
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: New prompt: Move more precmd() code to hook fncs

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: cc7541fb2cd2222bece7d9b4144a645b73f31d36
      https://github.com/grml/grml-etc-core/commit/cc7541fb2cd2222bece7d9b4144a645b73f31d36
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: New prompt: Allow `items' list for PS1 _and_ RPS1

We have this $PERCENT bit, that tracks battery status. And to integrate
that into the framework requires either a lot of code specialisation and
duplication, or we refactor the PS1 setting loop so it can set RSP1,
too.

This changes the configuration scheme a bit. Dokumentation updated
accordingly.

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: ee36478ba97d1c0b35a49b6d0cee9ae40261ea31
      https://github.com/grml/grml-etc-core/commit/ee36478ba97d1c0b35a49b6d0cee9ae40261ea31
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: New prompt: support [[ $BATTERY -gt 0 ]]

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: c1d7811e6f1bef219bd69ece2e7cdac9a91543ce
      https://github.com/grml/grml-etc-core/commit/c1d7811e6f1bef219bd69ece2e7cdac9a91543ce
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: New prompt: Support TERM == dumb

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: c875d64b68ce86c7b3f3e6670d5f06a84d164013
      https://github.com/grml/grml-etc-core/commit/c875d64b68ce86c7b3f3e6670d5f06a84d164013
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: New prompt: Username in red for root

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: 9dfd5ff262bda5be5451137645ad430afc9f8ba3
      https://github.com/grml/grml-etc-core/commit/9dfd5ff262bda5be5451137645ad430afc9f8ba3
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: New prompt: Add new theme: grml-large

This is what should be enabled if GRMLPROMPT=1 was specified by the user.

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: 76c7e00a69a57292381caee925be76b6f1f6f274
      https://github.com/grml/grml-etc-core/commit/76c7e00a69a57292381caee925be76b6f1f6f274
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: New prompt: Add new theme: grml-chroot

This should replace the GRML_CHROOT specific prompt.

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: 316eaebc386b455ca1ecd08f8fa81527f899e101
      https://github.com/grml/grml-etc-core/commit/316eaebc386b455ca1ecd08f8fa81527f899e101
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: New prompt: Fix wrong logic for user name colouring

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: 205760c1ae3ce988642c74a7c11808c1ecaec082
      https://github.com/grml/grml-etc-core/commit/205760c1ae3ce988642c74a7c11808c1ecaec082
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: Enable the grml prompt theme via promptsys

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: 4dc88ce5e68f7b0d311dfd0e5bbcb9035554d552
      https://github.com/grml/grml-etc-core/commit/4dc88ce5e68f7b0d311dfd0e5bbcb9035554d552
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: New prompt: Fix quoting style in dumb-terminal config

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: 1daee92fd14c3ded4b40f99796039c8962a08478
      https://github.com/grml/grml-etc-core/commit/1daee92fd14c3ded4b40f99796039c8962a08478
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: New prompt: Handle grml-chroot in dumb-terminal config

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: a94f602777da92b43192f30f299efd49820b47cf
      https://github.com/grml/grml-etc-core/commit/a94f602777da92b43192f30f299efd49820b47cf
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: New prompt: Enable one of the prompts

Mimic the old way of choosing the "right" prompt.

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: db038bb74540fecc9aaef863aac762dba7df3ea7
      https://github.com/grml/grml-etc-core/commit/db038bb74540fecc9aaef863aac762dba7df3ea7
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: New prompt: Provide fallback in case promptinit fails

This should not happen usually. But better be safe than sorry.

In case something goes wrong we only support _one_ prompt, with the original
root-is-red changeroo.  This is good enough as a fallback.

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: 605fb0e77f8abf5d95c6f77f7c9d442296efa403
      https://github.com/grml/grml-etc-core/commit/605fb0e77f8abf5d95c6f77f7c9d442296efa403
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: New prompt: Remove old prompt setting scheme

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: 5989b0e376ba27205f6bfc6277de52fbf5d0d482
      https://github.com/grml/grml-etc-core/commit/5989b0e376ba27205f6bfc6277de52fbf5d0d482
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: New prompt: Reorganise the prompt section

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: 08ab5d927b758f7f3445d0dd57b6f9076d1636ca
      https://github.com/grml/grml-etc-core/commit/08ab5d927b758f7f3445d0dd57b6f9076d1636ca
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: New prompt: Only enable prompt themes with zsh >= 4.3.7

The themes do use modern features, that require this constraint.

The fallback prompt, that was being used when promptsys wasn't available
is _way_ more backwards compatible (and will remain like that). Use that
fallback in cases of $ZSH_VERSION < 4.3.7 as well.

This also means, that the GRMLPROMPT=1 and [[ -n $GRML_CHROOT ]] prompts
are not available with shells that old. Version 4.3.7 of zsh was
released on 2008-10-28. I think it's reasonable to require ~5 year old
software for the full-blown version of a setup. The last stable debian
release ships version 4.3.10 and the upcoming release will sport version
4.3.17. Grml ISOs come with version >= 5.0.0.

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: 6cc9bb0088991a133c43bf0ff77e12536b160ca3
      https://github.com/grml/grml-etc-core/commit/6cc9bb0088991a133c43bf0ff77e12536b160ca3
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: Use a non-forking expression to read /etc/debian_chroot

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: 2b02230c5fb24815f107068bd15a5dbc1b46ef64
      https://github.com/grml/grml-etc-core/commit/2b02230c5fb24815f107068bd15a5dbc1b46ef64
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: Move CNF handler to a better place

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: 6a512b0c54fdc39142b1015386992387d68aab86
      https://github.com/grml/grml-etc-core/commit/6a512b0c54fdc39142b1015386992387d68aab86
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: Move preexec() code to hooks

This allows for way more control and customisation by the user, just
like the same move with precmd(), that was done earlier does.

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: e705ddd7c09db9ed34c0fe7c1e92b86a0fb50519
      https://github.com/grml/grml-etc-core/commit/e705ddd7c09db9ed34c0fe7c1e92b86a0fb50519
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: New prompt: Keep maps sorted

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: 1a812ddcb39535473ec8f019138d6d59287a11a0
      https://github.com/grml/grml-etc-core/commit/1a812ddcb39535473ec8f019138d6d59287a11a0
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: New prompt: Documentation update

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: 6de54e2b1178cd37b8676b6be35b4a7f03e49bff
      https://github.com/grml/grml-etc-core/commit/6de54e2b1178cd37b8676b6be35b4a7f03e49bff
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M doc/grmlzshrc.t2t

  Log Message:
  -----------
  grmlzshrc.t2t: Document the new prompt themes

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: b5b5fbf741a1c6aec1fa7dc8a497c9be1c53f665
      https://github.com/grml/grml-etc-core/commit/b5b5fbf741a1c6aec1fa7dc8a497c9be1c53f665
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M doc/grmlzshrc.t2t

  Log Message:
  -----------
  grmlzshrc.t2t: Update copyright years

Signed-off-by: Frank Terbeck <ft at grml.org>


  Commit: 4e72b7f8b875e50c552855e0564a101151c635fb
      https://github.com/grml/grml-etc-core/commit/4e72b7f8b875e50c552855e0564a101151c635fb
  Author: Frank Terbeck <ft at grml.org>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: New prompt mixed up %B and %b for the path item


Compare: https://github.com/grml/grml-etc-core/compare/aa572fc72a5f...4e72b7f8b875


More information about the Git-commits mailing list