Commit graph

5,967 commits

Author SHA1 Message Date
Marc Cornellà
edf28b8827 fix(lib): use -N syntax in head and tail to support Solaris (#6391)
Closes #6391

Co-authored-by: Sergey Mashkov <cy6erGn0m@gmail.com>
2021-03-21 13:37:50 -04:00
Arnaud Thimel
edd7c74172 feat(git-prompt): display stash count in prompt 2021-03-21 13:37:50 -04:00
Arnaud Thimel
e41090a2e8 feat(git-prompt): display untracked files count
Closes #8435
Closes #4880
2021-03-21 13:37:50 -04:00
Suhas Karanth
d30963acf6 chore: caution against COMPLETION_WAITING_DOTS in template (#8352) 2021-03-21 13:37:50 -04:00
Ruslan Sayfutdinov
6b6adbaf5e fix(colorize): bypass less aliases in colorize_less (#9593) 2021-03-21 13:37:50 -04:00
wilkis
c5278aef0c feat(last-working-dir): log separate lwds for different SSH keys on the same user account (#9534)
Co-authored-by: Marc Cornellà <hello@mcornella.com>
2021-03-21 13:37:50 -04:00
Søren Nielsen
fc866edd62 feat(macports): add 'reclaim' to completion list for Macports (#9521)
The sub-command `reclaim` is quite useful for freeing up disk space.
`reclaim` is a useful command that is missing from the list of completions in the plugin.

The description is for the `reclaim` sub-command is:
"port reclaim will find files that can be removed to reclaim disk space by uninstalling inactive ports on your system as well as unnecessary unrequested ports, and removing unneeded or unused installation files. The user is then provided interactive options for files to remove. No files are removed initially, until the user selects them from the provided list."

For all the details use this command on a system with Macports installed:

`port help reclaim`
2021-03-21 13:37:50 -04:00
TIT
4933f62771 fix(jake-node): support all Jakefile filenames in jake completion (#9589) 2021-03-21 13:37:50 -04:00
Marc Cornellà
285614d9c6 fix(changelog): fix spacing in breaking changes message 2021-03-21 13:37:50 -04:00
Marc Cornellà
a98833777f fix(universalarchive): make plugin zsh-only to fix realpath not found error
Fixes #9586
2021-03-21 13:37:49 -04:00
Kyle Gerard Felker
b2a1478073 fix(lib): update Emacs terminal detection in title function (#9577)
Environment variable EMACS was replaced by INSIDE_EMACS
2021-03-21 13:37:49 -04:00
Marc Cornellà
ccca475000 fix(changelog): display scope in breaking change messages 2021-03-21 13:37:49 -04:00
Marc Cornellà
a868b66d2a fix(CLI): show symlinked themes in omz theme list 2021-03-21 13:37:49 -04:00
Marc Cornellà
805864f842 chore: add Konfekt as universalarchive maintainer 2021-03-21 13:37:49 -04:00
Konfekt
0925ae8679 feat(plugins): add universalarchive plugin to conveniently compress files (#6846)
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
2021-03-21 13:37:49 -04:00
Marc Cornellà
3375aec95d fix(vi-mode)!: add back edit-command-line key binding as 'vv' (#9573)
BREAKING CHANGE: the key binding to open an editor to edit the command line has
been moved from being `v` (press v once) to being `vv` (press v twice). Now, the
action for `v` is the default `visual-mode`, as is in Vim.

Fixes #9573
2021-03-21 13:37:49 -04:00
Marc Cornellà
0fafea2fb6 fix(vi-mode): hide cursor-change logic behind VI_MODE_SET_CURSOR setting
Fixes #9570
2021-03-21 13:37:49 -04:00
Marc Cornellà
e0e7879e82 docs(vi-mode): revamp README and document settings 2021-03-21 13:37:49 -04:00
Gabriel Corral
2b7948302a fix(archlinux): update URL and key server in pacmanallkeys (#9569)
- Added follow redirects curl flag to fix the 301 response
- Updated trusted users URL format
- Changed from `pgp.mit.edu` keyserver to `keyserver.ubuntu.com` keyserver
2021-03-21 13:37:49 -04:00
Fernando Crespo
a54b2f63b2 feat(CLI): add plugin info subcommand (#9452)
Co-authored-by: Fernando Crespo <fxcrespo@iMac-44054.local>
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
2021-03-21 13:37:49 -04:00
Marc Cornellà
8451b3562d refactor(vi-mode): remove duplicate bindkey logic and fix syntax 2021-03-21 13:37:49 -04:00
Robert Estelle
baec25a01a fix(vi-mode): control cursor, restore and use visual mode and speed up mode changes (#8004) 2021-03-21 13:37:49 -04:00
Paul Robert Lloyd
1d7ec88742 docs(nvm): clarify how to enable settings (#9542)
It wasn’t clear where I should set the `NVM_AUTOLOAD` variable. The clue was to be found in [the docs for another plugin](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/fzf). It seems setting values need to come before Oh My Zsh is sourced.

Updated read me to reflect this, and the fact that one of the settings mentioned is specific to nvm, not this plugin.
2021-03-21 13:37:49 -04:00
Seamile
7eb0be2b64 fix(lib): mark changes as MODIFIED on 'MM' in git_prompt_status (#9552)
In the output of `git status -sb`, 'MM' indicates there are both added and modified changes.
This change marks that case as MODIFIED instead of ADDED.
2021-03-21 13:37:49 -04:00
Peter Babič
f9cac8fb77 feat(git): add grst alias for git restore --staged (#8932)
Closes #8932
2021-03-21 13:37:49 -04:00
YantaoZhao
f0394024ca feat(docker): update completion to upstream version (#9470) 2021-03-21 13:37:49 -04:00
Marc Cornellà
02cf2bbf5c fix(CLI): properly get zsh command in omz update (#9558)
Zsh versions older than 5.3 don't have ZSH_ARGZERO, so use an alternative
method to get the zsh command.

Fixes #9558
2021-03-21 13:37:49 -04:00
hjpotter92
dc718b047d feat(grc): source grc.zsh instead of hard-coding its content (#9553)
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
2021-03-21 13:37:49 -04:00
Marc Cornellà
6a4f68680a fix(changelog): remove CR characters in breaking change messages
The GitHub UI might not remove CR characters from commit description forms
filled from a Windows browser.
2021-03-21 13:37:49 -04:00
Josh E. Roberts
4691e80b85 fix(brew)!: update bcubc alias to use brew upgrade --cask (#9501)
BREAKING CHANGE: changes deprecated `brew cask reinstall $(...)` alias to use
`brew upgrade --cask` instead. If you don't have this command, run `brew update` to
get the latest Homebrew CLI version.

Co-authored-by: jakepez <jake@findjake.com>
2021-03-21 13:37:49 -04:00
Marc Cornellà
d21ed61266 fix(updater): don't pipe changelog to less when updating
Fixes #9509
2021-03-21 13:37:49 -04:00
Marc Cornellà
3ca3761ccb fix(genpass): use log() instead of log2() for zsh < 5.6 (#9548)
Fixes #9548
2021-03-21 13:37:49 -04:00
Marc Cornellà
aff4049499 chore: update git-lfs maintainer handle 2021-03-21 13:37:49 -04:00
Roman Perepelitsa
0675c91f4d fix(genpass): improve performance and usability and fix bugs (#9520)
*Bugs*

The following bugs have been fixed:

- All generators ignored errors from external commands. For example,
  if `/usr/share/dict/words` was unreadable, `genpass-xkcd` would
  print "0-" as a password and return success.
- All generators silently ignored the argument if it wasn't a number.
  For example, `genpass-apple -2` was generating one password and
  not printing any errors.
- All generators silently ignored extra arguments. For example,
  `genpass-apple -n 2` was generating one password and not printing
  any errors.
- `genpass-xkcd` was generating passwords with less than 128 bits of
  security margin in contradiction to documentation. The smaller the
  dictionary size, the weaker the passwords it was generating. For a
  dictionary with 27 words, `genpass-xkcd` was generating passwords
  with 93 bits of security margin (`log2(27!)`).
- The source of random data used by `genpass-xkcd` was not
  cryptographically secure in contradiction to documentation. See:
  https://www.gnu.org/software/coreutils/manual/html_node/Random-sources.html
- `genpass-apple` could generate a password with non-ascii characters
  depending on user locale. For example, passwords could contain 'İ'
  for users with Turkish locale.
- `genpass-apple` didn't work with `ksh_arrays` shell option.
- `genpass-xkcd` was printing spurious errors with `ksh_arrays` shell
  option.
- `genpass-xkcd` was producing too short (weak) or too strong (long)
  and/or printing errors when `IFS` was set to non-default value.
- All generators were printing fewer passwords than requested and
  returning success when passed a very large number as an argument.

*Usability*

Generators are now implemented as self-contained executable files.
They can be invoked from scripts with no additional setup.

Generators no longer depend on external commands. The only dependencies
are `/dev/urandom` and, for `genpass-xkcd`, `/usr/share/dict/words`.

All generators used to silently ignore all arguments after the first
and the first argument if it wasn't a number. For example, both
`genpass-apple -2` and `genpass-apple -n 2` were generating one password
and not printing any errors. Now these print an error and fail.

*Performance*

The time it takes to load the plugin has been greatly reduced. This
translates into faster zsh startup when the plugin is enabled.

Incidentally, two generators out of three have been sped up to a large
degree while one generator (`genpass-xkcd`) has gotten slower. This is
unlikely to matter one way or another unless generating a very large
number of passwords. In the latter case `genpass-xkcd` is now also
faster than it used to be.

The following table shows benchmark results from Linux x86-64 on i9-7900X.
The numbers in the second and third columns show how many times a given
command could be executed per second. Higher numbers are better.

command                     | before (Hz) | after (Hz) | speedup |
----------------------------|------------:|-----------:|--------:|
`source genpass.plugin.zsh` |        4810 |      68700 |  +1326% |
`genpass-apple`             |        30.3 |        893 |  +2846% |
`genpass-monkey`            |         203 |       5290 |  +2504% |
`genpass-xkcd`              |        34.4 |       14.5 |    -58% |
`genpass-xkcd 1000`         |       0.145 |      0.804 |   +454% |
2021-03-21 13:37:49 -04:00
Patrick Harrison
85db8c2be3 fix(genpass): add compatibility for macOS paste command
"paste" on macOS requires a '-' to signify that the standard input is used.
Without the '-' character, the command errors out.
2021-03-21 13:37:49 -04:00
Marc Cornellà
f9285022ca fix(genpass): warn if no wordlist is found 2021-03-21 13:37:49 -04:00
Patrick Harrison
1c963854cc fix(genpass): check for presence of shuf command.
"shuf" is not a standard command on MacOS and requires installation of the brew coreutils package
2021-03-21 13:37:49 -04:00
Matt Lewin
dfb4bfa0cf fix(genpass): fix grep regex in genpass-xkcd for FreeBSD version (#9514) 2021-03-21 13:37:49 -04:00
Aaron Toponce
3919d0f427 fix(genpass): only use words with ASCII characters in genpass-xkcd (#9508) 2021-03-21 13:37:49 -04:00
Marc Cornellà
42dbb1b375 fix(changelog): allow breaking change message to span multiple lines
This also allows the option to put extra paragraphs after the BREAKING CHANGE
message while properly displaying the breaking change message. Useful, for
example, to add signed-off or co-authored lines.
2021-03-21 13:37:49 -04:00
Marc Cornellà
6f223b3157 feat(updater): save version prior to updating so omz changelog just works™
Fixes #9505
2021-03-21 13:37:49 -04:00
Aaron Toponce
bb3f100281 feat(plugins): add genpass plugin with 3 distinct password generators (#9502) 2021-03-21 13:37:49 -04:00
Marc Cornellà
b23f47fe46 fix(composer): autoload _cache_invalid for antigen compatibility
Antigen doesn't call `compinit` until the user prompt is about to be shown,
which means `_cache_invalid` isn't automatically autoloaded. This patch
fixes that, though we should work towards a better caching mechanism.

Fixes #9490
2021-03-21 13:37:49 -04:00
Marc Cornellà
e6aaf4a60b chore!: notify breaking change in git_prompt_info
BREAKING CHANGE: the git config option to skip running `git_prompt_info` has changed from `oh-my-zsh.hide-status` to `oh-my-zsh.hide-info` (#9188).
2021-03-21 13:37:49 -04:00
Bruno Borges
4e0a759f73 feat(lib): show upstream branch in git_prompt_info (#9188)
Show the remote branch the local branch is tracking if `ZSH_THEME_GIT_SHOW_UPSTREAM`
is set, like so: `ZSH_THEME_GIT_SHOW_UPSTREAM=1`.

Co-authored-by: Marc Cornellà <marc.cornella@live.com>
2021-03-21 13:37:49 -04:00
Marc Cornellà
27966adec0 refactor(hanami): change global aliases and clean up README 2021-03-21 13:37:49 -04:00
Marc Cornellà
00e2ff2591 Document fd alias change in README 2021-03-21 13:37:49 -04:00
Rohit Goswami
bf42b991f1 fd: Rework command to be more idiomatic
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
2021-03-21 13:37:49 -04:00
Rohit Goswami
6aa3c97bbf aliases: Don't overshadow fd 2021-03-21 13:37:49 -04:00
Mark Mercado
2e9de78ce4 feat(plugins): add grc plugin for Generic Colouriser (#9315)
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
2021-03-21 13:37:49 -04:00