Coder Social home page Coder Social logo

prezto-contrib's Introduction

prezto-contrib

Prezto is a configuration framework for zsh aimed at providing better defaults and other conveniences. However, to avoid feature bloat in the core repository, prezto-contrib was born. This repository is meant to include additional modules which are either not ready for inclusion in prezto-core or don't currently have a maintainer willing to support them.

Usage

Multiple module directory support is built into prezto, so it's pretty easy to use these modules. Simply do the following:

cd $ZPREZTODIR
git clone --recurse-submodules https://github.com/belak/prezto-contrib contrib

After the repo is cloned, you can load modules in the same way you'd load a normal prezto module.

Alternatively, you can clone contrib elsewhere and update the module dirs setting.

prezto-contrib's People

Contributors

333fred avatar ajeetdsouza avatar angvp avatar belak avatar bet4it avatar bmcustodio avatar catflyflyfly avatar diraol avatar fladson avatar glitches avatar jperras avatar jpigree avatar kornicameister avatar lambdanerd avatar lucianomagrao avatar n4m3z avatar nomasprime avatar philihp avatar quicknir avatar rickmeijer avatar romkatv avatar salamandar avatar salmanulfarzy avatar sergiorussia avatar starsprung avatar tieubao avatar timonbimon avatar yuokada avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

prezto-contrib's Issues

Improve Kubernetes module

Description

Hi everyone, I want to contribute a module for Kubernetes but I saw the issue #1411 in sorin/prezto and the other following discussions.

I understand that you are in deep reflexion on what to do with contributions and new modules and that the kubectl module was added to this repository.

My goal is to add extra features and perhaps refactor the existing module to make it compliant if needed. Since I want to share with the community, I may aswell ask first what I can do and where I should do it.

A bit of context, kubernetes is a container orchestrator. Its command-line tool (kubectl) is as (perhaps more) complicated than Git (41 subcommands). I use it daily without any helper and it is a bit of a pain.

The features I have in mind are:

  • functions/aliases to monitor applications (watch-like commands to show live changes in infrastructure...), switch contexts, etc...
  • Display the current cluster in the command-line (kubectl applies command to a cluster of machines stored in context, a bit like git applies commands on the current repository). Perhaps at the right side like git-info. It should be compatible with any other module displaying infos at the right side of the command line.

My questions are:

  • Should I come with a Pull Request made mostly to address my needs or should I discuss what needs to be done first?
  • Should I wait for your policy on contributions before contributing (I believe you want to move this repo)?
  • How can I test that my module works on multiple machines? Do we have some kind of a test framework?
  • I don't see any lib of functions or template to create a new module inside prezto. Would it be useful to have those (reduce code duplication, give an idea on what to do when creating a new module, etc...)?
  • How can I use this contrib repo in my setup of prezto?

Thank you for your answers. I never wrote zsh scripts but I am used to write Bash and Python scripts. I think I will mostly emulate what was done in the git module.

I used prezto for years (and installed it for countless people) and it always proven to be useful and stable. I am happy to see that new maintainers are taking on the project. Thank you. :)

FZF module

Hello,

I maintain a fzf-prezto module that does exactly what this repo is meant to do (plug in to prezto's contrib directory). Is there any interest in including that into this project?

update spaceship-prompt

hi belak, thanks for adding this to prezto :)
could you update the spaceship-prompt submodule to the latest version (v3.4.1)?

sorin-contrib theme - grep -P not available on osx

@jpigree - You seem to have been the original author (thank you, this theme is awesome!) Looks like you may be a linux guy though. If that's the case, here's the man output of grep on my osx high sierra machine:

I just took the -P out here: contrib/contrib-prompt/functions/prompt_sorin_contrib_setup:53 I'm not sure what this line is trying to do, but the name of my cluster is showing up in all of its gcloud autonaming glory anyway.

Here's what the grep (BSD grep) 2.5.1-FreeBSD has on High Sierra

GREP(1)                   BSD General Commands Manual                  GREP(1)

NAME
     grep, egrep, fgrep, zgrep, zegrep, zfgrep -- file pattern searcher

SYNOPSIS
     grep [-abcdDEFGHhIiJLlmnOopqRSsUVvwxZ] [-A num] [-B num] [-C[num]] [-e pattern] [-f file]
          [--binary-files=value] [--color[=when]] [--colour[=when]] [--context[=num]] [--label]
          [--line-buffered] [--null] [pattern] [file ...]

DESCRIPTION
     The grep utility searches any given input files, selecting lines that match one or more patterns.
     By default, a pattern matches an input line if the regular expression (RE) in the pattern matches
     the input line without its trailing newline.  An empty expression matches every line.  Each input
     line that matches at least one of the patterns is written to the standard output.

     grep is used for simple patterns and basic regular expressions (BREs); egrep can handle extended
     regular expressions (EREs).  See re_format(7) for more information on regular expressions.  fgrep
     is quicker than both grep and egrep, but can only handle fixed patterns (i.e. it does not inter-
     pret regular expressions).  Patterns may consist of one or more lines, allowing any of the pattern
     lines to match a portion of the input.

     zgrep, zegrep, and zfgrep act like grep, egrep, and fgrep, respectively, but accept input files
     compressed with the compress(1) or gzip(1) compression utilities.

     The following options are available:

     -A num, --after-context=num
             Print num lines of trailing context after each match.  See also the -B and -C options.

     -a, --text
             Treat all files as ASCII text.  Normally grep will simply print ``Binary file ...
             matches'' if files contain binary characters.  Use of this option forces grep to output
             lines matching the specified pattern.

     -B num, --before-context=num
             Print num lines of leading context before each match.  See also the -A and -C options.

     -b, --byte-offset
             The offset in bytes of a matched pattern is displayed in front of the respective matched
             line.

     -C[num, --context=num]
             Print num lines of leading and trailing context surrounding each match.  The default is 2
             and is equivalent to -A 2 -B 2.  Note: no whitespace may be given between the option and
             its argument.

     -c, --count
             Only a count of selected lines is written to standard output.

     --colour=[when, --color=[when]]
             Mark up the matching text with the expression stored in GREP_COLOR environment variable.
             The possible values of when can be `never', `always' or `auto'.

     -D action, --devices=action
             Specify the demanded action for devices, FIFOs and sockets.  The default action is `read',
             which means, that they are read as if they were normal files.  If the action is set to
             `skip', devices will be silently skipped.

     -d action, --directories=action
             Specify the demanded action for directories.  It is `read' by default, which means that
             the directories are read in the same manner as normal files.  Other possible values are
             `skip' to silently ignore the directories, and `recurse' to read them recursively, which
             has the same effect as the -R and -r option.

     -E, --extended-regexp
             Interpret pattern as an extended regular expression (i.e. force grep to behave as egrep).

     -e pattern, --regexp=pattern
             Specify a pattern used during the search of the input: an input line is selected if it
             matches any of the specified patterns.  This option is most useful when multiple -e
             options are used to specify multiple patterns, or when a pattern begins with a dash (`-').

     --exclude
             If specified, it excludes files matching the given filename pattern from the search.  Note
             that --exclude patterns take priority over --include patterns, and if no --include pattern
             is specified, all files are searched that are not excluded.  Patterns are matched to the
             full path specified, not only to the filename component.

     --exclude-dir
             If -R is specified, it excludes directories matching the given filename pattern from the
             search.  Note that --exclude-dir patterns take priority over --include-dir patterns, and
             if no --include-dir pattern is specified, all directories are searched that are not
             excluded.

     -F, --fixed-strings
             Interpret pattern as a set of fixed strings (i.e. force grep to behave as fgrep).

     -f file, --file=file
             Read one or more newline separated patterns from file.  Empty pattern lines match every
             input line.  Newlines are not considered part of a pattern.  If file is empty, nothing is
             matched.

     -G, --basic-regexp
             Interpret pattern as a basic regular expression (i.e. force grep to behave as traditional
             grep).

     -H      Always print filename headers with output lines.

     -h, --no-filename
             Never print filename headers (i.e. filenames) with output lines.

     --help  Print a brief help message.

     -I      Ignore binary files.  This option is equivalent to --binary-file=without-match option.

     -i, --ignore-case
             Perform case insensitive matching.  By default, grep is case sensitive.

     --include
             If specified, only files matching the given filename pattern are searched.  Note that
             --exclude patterns take priority over --include patterns.  Patterns are matched to the
             full path specified, not only to the filename component.

     --include-dir
             If -R is specified, only directories matching the given filename pattern are searched.
             Note that --exclude-dir patterns take priority over --include-dir patterns.

     -J, --bz2decompress
             Decompress the bzip2(1) compressed file before looking for the text.

     -L, --files-without-match
             Only the names of files not containing selected lines are written to standard output.
             Pathnames are listed once per file searched.  If the standard input is searched, the
             string ``(standard input)'' is written.

     -l, --files-with-matches
             Only the names of files containing selected lines are written to standard output.  grep
             will only search a file until a match has been found, making searches potentially less
             expensive.  Pathnames are listed once per file searched.  If the standard input is
             searched, the string ``(standard input)'' is written.

     --mmap  Use mmap(2) instead of read(2) to read input, which can result in better performance under
             some circumstances but can cause undefined behaviour.

     -m num, --max-count=num
             Stop reading the file after num matches.

     -n, --line-number
             Each output line is preceded by its relative line number in the file, starting at line 1.
             The line number counter is reset for each file processed.  This option is ignored if -c,
             -L, -l, or -q is specified.

     --null  Prints a zero-byte after the file name.

     -O      If -R is specified, follow symbolic links only if they were explicitly listed on the com-
             mand line.  The default is not to follow symbolic links.

     -o, --only-matching
             Prints only the matching part of the lines.

     -p      If -R is specified, no symbolic links are followed.  This is the default.

     -q, --quiet, --silent
             Quiet mode: suppress normal output.  grep will only search a file until a match has been
             found, making searches potentially less expensive.

     -R, -r, --recursive
             Recursively search subdirectories listed.

     -S      If -R is specified, all symbolic links are followed.  The default is not to follow sym-
             bolic links.

     -s, --no-messages
             Silent mode.  Nonexistent and unreadable files are ignored (i.e. their error messages are
             suppressed).

     -U, --binary
             Search binary files, but do not attempt to print them.

Vi-mode in spaceship

Hi belak,
I am finding some problems with vi-mode in the Spaceship theme.
Previously it correctly signaled the transition from normal to insert mode, now it always remains in insert.

I am using

  • zprezto latest version
  • prezto-contrib latest version

Can you check if it works correctly?

P.s. If I runs spaceship_vi_mode_enable it starts working again

Is it possible to add or use oh-my-zsh plugins in prezto?

Is it possible to use an oh-mh-zsh plugin (mvn one specifically) in the contrib folder and load it as a module?

Wasn't any docs about it but I know antigen can do this, wondered if was a trivial thing to do or anyone had experience or knew how to do it.

`alias-tips` module still use older version of the zsh plugin which use Python 2

Many operating systems nowaday include macOS and Ubuntu has removed the EOL Python 2. Since the alias-tips prezto module is linked to the older version of the actual zsh plugin which still use python, the module will output this every times it is invoked.

_alias_tips__preexec:34: command not found: python

This issue was raised at djui/alias-tips#60 and actually resolved at djui/alias-tips#54. It could be resolved here as well by update the module to the latest version of the zsh plugin.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.