0
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-09-19 04:01:21 +02:00
Commit graph

5943 commits

Author SHA1 Message Date
Fernando Crespo
9e5f280f87
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-01-03 13:55:57 +01:00
Marc Cornellà
0e833b622b refactor(vi-mode): remove duplicate bindkey logic and fix syntax 2021-01-02 23:59:55 +01:00
Robert Estelle
98762faa07
fix(vi-mode): control cursor, restore and use visual mode and speed up mode changes (#8004) 2021-01-02 22:41:57 +01:00
Paul Robert Lloyd
4298e89b4b
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-01-02 14:04:34 +01:00
Seamile
88ffc2f666
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-01-02 11:57:06 +01:00
Peter Babič
0f6aa0182c feat(git): add grst alias for git restore --staged (#8932)
Closes #8932
2021-01-01 18:23:42 +01:00
YantaoZhao
3d6db32610
feat(docker): update completion to upstream version (#9470) 2021-01-01 18:11:01 +01:00
Marc Cornellà
0f6836701d 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
2020-12-31 23:20:24 +01:00
hjpotter92
0e7c81316c
feat(grc): source grc.zsh instead of hard-coding its content (#9553)
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
2020-12-31 11:07:28 +01:00
Marc Cornellà
a4a79eaa8c 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.
2020-12-30 20:02:24 +01:00
Josh E. Roberts
a251233bec
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>
2020-12-30 19:56:56 +01:00
Marc Cornellà
4b2431e8b1 fix(updater): don't pipe changelog to less when updating
Fixes #9509
2020-12-28 19:40:03 +01:00
Marc Cornellà
90ffda7ed2 fix(genpass): use log() instead of log2() for zsh < 5.6 (#9548)
Fixes #9548
2020-12-27 20:51:39 +01:00
Marc Cornellà
e9991c6aa0
chore: update git-lfs maintainer handle 2020-12-25 19:39:42 +01:00
Roman Perepelitsa
b28665aebb
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% |
2020-12-16 16:57:59 +01:00
Marc Cornellà
f2a4b2b17b fix(genpass): in genpass-xkcd, add warnings and make it compatible with macOS
Closes #9515
Closes #9516
2020-12-14 15:52:32 +01:00
Patrick Harrison
2db42c6ce7 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.
2020-12-14 15:52:32 +01:00
Marc Cornellà
076f7f1eb1 fix(genpass): warn if no wordlist is found 2020-12-14 15:52:30 +01:00
Patrick Harrison
619097cc2a fix(genpass): check for presence of shuf command.
"shuf" is not a standard command on MacOS and requires installation of the brew coreutils package
2020-12-14 15:52:14 +01:00
Matt Lewin
2a0ae3315d
fix(genpass): fix grep regex in genpass-xkcd for FreeBSD version (#9514) 2020-12-13 22:28:22 +01:00
Aaron Toponce
f8e9339c87
fix(genpass): only use words with ASCII characters in genpass-xkcd (#9508) 2020-12-13 01:20:41 +01:00
Marc Cornellà
e2c73cf59a 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.
2020-12-12 14:22:26 +01:00
Marc Cornellà
e8e37eedbc feat(updater): save version prior to updating so omz changelog just works™
Fixes #9505
2020-12-12 13:50:53 +01:00
Aaron Toponce
9d6b3984f9
feat(plugins): add genpass plugin with 3 distinct password generators (#9502) 2020-12-12 12:50:45 +01:00
Marc Cornellà
9181954255 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
2020-12-11 16:54:22 +01:00
Marc Cornellà
28265812f8 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).
2020-12-10 20:48:40 +01:00
Bruno Borges
2f39c68ab0
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>
2020-12-10 20:44:08 +01:00
Marc Cornellà
79d0182a26 refactor(hanami): change global aliases and clean up README 2020-12-10 20:38:19 +01:00
Marc Cornellà
e4082a951f
fix(common-aliases)!: don't overshadow fd if installed (#9162)
BREAKING CHANGE: in `common-aliases`, the `fd` alias won't be defined if `fd` is installed (https://github.com/sharkdp/fd).
2020-12-09 23:17:53 +01:00
Marc Cornellà
5feb2b6742 Document fd alias change in README 2020-12-09 23:11:31 +01:00
Rohit Goswami
fbee1ff8bd
fd: Rework command to be more idiomatic
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
2020-12-10 01:50:01 +05:30
Mark Mercado
e5af22cca6
feat(plugins): add grc plugin for Generic Colouriser (#9315)
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
2020-12-09 17:59:12 +01:00
Joseph Heyburn
e2f2489a66
fix(git): silently fail in git_main_branch if not in a git repo (#9484)
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
2020-12-08 18:25:42 +01:00
Marc Cornellà
452586e79a chore: add Josh Medeski as wp-cli plugin maintainer 2020-12-07 22:01:43 +01:00
ratijas
865d2d8a53
refactor(archlinux): prevent leaking local variables (#9476)
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
2020-12-07 22:00:25 +01:00
Veesar
e48be7dfc8
feat(wp-cli): add aliases for DB management (#9469) 2020-12-07 21:23:55 +01:00
Marc Cornellà
4b7dba5b75 feat(lib)!: soft-deprecate upgrade_oh_my_zsh function for everybody
BREAKING CHANGE: the `upgrade_oh_my_zsh` function now calls `omz update` directly.
2020-12-07 20:58:12 +01:00
Marc Cornellà
92fa8153d5 fix(changelog): fix assoc array syntax for zsh 5.4.2 and older (#9495)
Also fixed a call to a defunct display:type-header function in displaying
breaking changes.
2020-12-07 20:58:12 +01:00
Marc Cornellà
5a888ff4ac fix(updater): don't show changelog when running unattended update (#9495)
Fixes #9495
2020-12-07 20:58:12 +01:00
赵崇延
fa1911f89e
fix(command-not-found): show error in Ubuntu when no package is found (#9418) 2020-12-05 15:42:45 +01:00
Marc Cornellà
4f8964d8ff fix(changelog): fix highlight of codeblocks in subject 2020-12-04 12:38:32 +01:00
Marc Cornellà
1aa2b18e29 feat(CLI): add --unattended flag to omz update to not reload zsh (#9187) 2020-12-04 12:34:01 +01:00
Marc Cornellà
81bbe86db0 fix(updater): properly show changelog via less 2020-12-04 12:33:36 +01:00
Stimim Chen
1ac40cd445
fix(git-prompt): make gitstatus.py python3-compatible (#9186)
check_output() in get_tagname_or_hash() returns bytes instead of str in
python3.  Decode the return value to utf-8, this works in both python2
and python3.

Co-authored-by: Stimim Chen <stimim@google.com>
2020-12-03 12:00:56 +01:00
Marc Cornellà
3f8af040e9 fix(updater): fix ignored variable name in read
I used _ which is a convention in other languages, but in shell scripting
$_ is a special variable set by the shell, and in Zsh versions older than
5.0.6 it complains for being a `read-only variable`.

Fixes #9482
2020-12-02 11:57:37 +01:00
Marc Cornellà
021f0251e0 fix(updater): make sure to run it with zsh 2020-12-01 11:12:31 +01:00
Marc Cornellà
7712da89ee feat(CLI): add omz changelog command 2020-11-30 15:48:46 +01:00
Marc Cornellà
eeab4e5186 feat(updater): add changelog display by parsing the commit list 2020-11-30 15:48:46 +01:00
Marc Cornellà
e093a4cf62 fix(updater): correctly restart the zsh session when the update pulled changes 2020-11-30 15:48:46 +01:00
Marc Cornellà
889cd7acf3 refactor(updater): switch to Zsh execution and fix git remote detection logic 2020-11-30 15:48:46 +01:00