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

589 commits

Author SHA1 Message Date
Marc Cornellà
d8cb670235 nvm: simplify nvm.sh and bash completion loading 2020-10-09 17:21:03 +02:00
Andrew Janke
ef44416df2 nvm: use nvm current in nvm_prompt_info and look in alternate install locations
This makes it work regardless of where nvm is loaded from. And it uses nvm's
version strings, which distinguish the "system" and "none" NVM environments,
instead of reporting the specific version of the system node.js or erroring,
respectively.

Fixes #4336
Closes #4338
2020-10-09 17:21:03 +02:00
Marc Cornellà
fc6c9ca4b4 lib: fix formatting in omz pr clean CLI command 2020-10-09 15:03:03 +02:00
Marc Cornellà
1bb402190d lib: add plugin and theme subcommands and fix omz pr clean
- Add plugin and theme subcommand

  Fixes #8961

- Add confirmation prompt to `omz pr clean` command

- Correct behavior on invalid answers on confirmation prompts

  If an invalid option is supplied, don't proceed with the potentially
  destructive action.

Co-authored-by: Rishabh Bohra <rishabhbohra01@gmail.com>
2020-10-09 13:55:56 +02:00
Marc Cornellà
865f6572d5 Fix performance drop of iterating over lines and other stuff
- Fix 'STASHED' key and unsupported syntax in 5.0.2
- Optimise `if` statement to make it more idiomatic.
2020-10-09 13:44:50 +02:00
Billy Conn
45a954cb0f git_prompt_status now uses hash lookups instead of multiple greps 2020-10-09 13:24:37 +02:00
Michał Dębski
297238b739 lib: hide git_prompt_status when hide-status is set
Closes #4912
Closes #5137
Closes #8071
2020-10-09 13:14:44 +02:00
Michele Bologna
58ff4e1d2e
lib: follow standards in window title (#9320)
In Ubuntu and Debian, in scp, and in rsync the prompt is by default specified as in

  user@hostname:/path/to/directory

while the previous title in ohmyzsh was

  user@hostname: /path/to/directory
2020-10-08 19:20:47 +02:00
Marc Cornellà
274df9dc29 lib: support simple terminal in title function
Fixes #9295
2020-09-29 18:34:35 +02:00
Marc Cornellà
4ec055b890 lib: support alacritty $TERM in title function 2020-09-28 22:25:10 +02:00
Marc Cornellà
765966606d lib: correct :q syntax in title function for clarity 2020-09-27 14:15:50 +02:00
Marc Cornellà
caff704f41 lib: clean up zsh_stats function 2020-09-26 12:17:12 +02:00
Marc Cornellà
50dc4ab357 lib: treat _ and - as part of a word
Fixes #8743
2020-09-04 21:54:05 +02:00
Marc Cornellà
89400f156a Remove zsh session restart on omz update and upgrade_oh_my_zsh 2020-08-18 19:51:19 +02:00
Marc Cornellà
7deda85f8c Fix upgrade_oh_my_zsh function deprecation 2020-08-17 22:11:02 +02:00
Marc Cornellà
079e7bb5e0 lib: remove CTRL-Backspace key binding altogether
It conflicts with normal Backspace behavior. Fixes #9155
2020-08-06 08:55:29 +02:00
Marc Cornellà
39c0073225 lib: remove CTRL-Backspace binding for vi keymaps 2020-08-05 14:34:14 +02:00
Dario Vladović
3935ccce64
cli: add update command (#9094)
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
2020-08-04 17:48:29 +02:00
Marc Cornellà
cf347ef3e4 lib: bind to all keymaps when COMPLETION_WAITING_DOTS is set
Fixes #9050
2020-08-04 17:30:07 +02:00
Marc Cornellà
e04564d528 lib: add CTRL-backspace and CTRL-delete to delete whole words
Fixes #7609
Closes #8191

Co-authored-by: Michal Grňo <m93a.cz@gmail.com>
2020-08-04 17:16:54 +02:00
Marc Cornellà
ec70c0c393 lib: bind keys to viins and vicmd keymaps and clean up file
Fixes #8468
2020-08-04 17:16:19 +02:00
Marc Cornellà
f6bc949c05 lib: substitute COMPLETION_WAITING_DOTS for ellipsis
Closes #8342
2020-08-02 20:49:26 +02:00
Marc Cornellà
9521837240 lib: support mlterm-256color
Co-authored-by: Peter J. Schroeder <peterjschroeder@gmail.com>
2020-07-23 12:55:22 +02:00
Robert Estelle
1c58a746af
lib: safety fix and speed-ups for git.zsh prompt functions (#7804) 2020-07-06 17:31:40 +02:00
Marc Cornellà
d0d01c0bbf lib: prefix diff call with command to bypass diff aliases
See https://github.com/ohmyzsh/ohmyzsh/pull/8807#issuecomment-652697704
2020-07-06 17:17:40 +02:00
Marc Cornellà
a15f0f0e9f cli: beauty touches on 'omz pr test' command 2020-07-03 19:05:40 +02:00
Monson Shao
62648d71bb
lib: enable diff color (#8807) 2020-07-01 20:51:13 +02:00
Patrick Moore
e606ac7051
Handle unset variables in various parts of the codebase (#8944)
DISABLE_UNTRACKED_FILES_DIRTY, DISABLE_AUTO_TITLE, GIT_STATUS_IGNORE_SUBMODULES are not set
Handle these variables not being set with conditional access.

If the user has set -u option to report attempts to use undeclared / unassigned variable, accessing the variables needs to be conditional.
2020-06-30 18:54:27 +02:00
joshuashaffer
b706a91917
core: add title support for mlterm (#8303) 2020-06-19 23:16:31 +02:00
Marco Trevisan
ed4e317bbb
lib: don't override bigger HISTSIZE and SAVEHIST values (#8993)
oh-my-zsh Changes the HISTSIZE and SAVEHIST values to fixed sizes,
however if a bigger value is set in ~/.zshrc, it will override it,
potentially causing the user history to be deleted.

So, only set these values if no other is set and if it is lower than the
default ones.
2020-06-03 19:34:57 +02:00
Benoit GALATI
fcd0747bc1
core: remove inc_append_history option (#8048) 2020-05-21 18:29:00 +02:00
Marc Cornellà
cfdd3c8dd8 Revert "core: enable hist_reduce_blanks"
This reverts commit cbd6fbe7a7.

Fixes #8949
2020-05-20 14:02:42 +02:00
Jacob Menke
582c8cb291
Prefix cd calls with builtin (#8937) 2020-05-20 11:30:11 +02:00
Marc Cornellà
cbd6fbe7a7 core: enable hist_reduce_blanks
Fixes #8722
2020-05-16 17:18:20 +02:00
Marc Cornellà
da8c19a076 core: fix zstyle definition of use-cache 2020-05-11 12:11:02 +02:00
Marc Cornellà
173d4ca68f core: move core folder to lib, for now 2020-05-01 19:15:14 +02:00
Marc Cornellà
0caae9082a lib: speed up slow parts of the lib files; other small fixes 2020-04-05 21:37:45 +02:00
Marc Cornellà
2eb3e9d57c
lib: support konsole* $TERM in title function (#8035) 2020-03-05 17:26:16 +01:00
Marc Cornellà
b9d5ee7913
lib: automatic title: replace fg with description from jobs (#7982)
* Automatic title: Replace fg with description from jobs

* Avoid error messages when there is no job

* Use $jobstates and $jobtexts to look for jobs

`jobs %string` doesn't work correctly when run inside `$()`. `$jobstates` and
`$jobtexts` is available in the current shell process, so even though we need
to replicate a bit more logic, every type of `fg` invocation works correctly.

* lib: clean up termsupport.zsh

Co-authored-by: Marc Cornellà <marc.cornella@live.com>
2020-03-03 20:21:29 +01:00
Marc Cornellà
02d1253809
lib: clean up termsupport.zsh 2020-03-03 20:17:01 +01:00
Marc Cornellà
d7825313cc
Use $jobstates and $jobtexts to look for jobs
`jobs %string` doesn't work correctly when run inside `$()`. `$jobstates` and
`$jobtexts` is available in the current shell process, so even though we need
to replicate a bit more logic, every type of `fg` invocation works correctly.
2020-03-03 20:10:43 +01:00
Marek Dědič
bbe54e4e60
lib: use command to run rm in upgrade function (#8696) 2020-03-03 13:46:06 +01:00
Marc Cornellà
d3dfc13716 lib: use grep-alias cache only if ZSH_CACHE_DIR is writable
Fixes #8693
2020-03-02 12:35:58 +01:00
Marc Cornellà
dc190d872a Refactor grep.zsh file
- Move grep-alias path to variable.
- Use <<< "" instead of piped echo to check grep flags.
- Remove check for --color only since it's the same release as --exclude.
2020-03-01 20:40:27 +01:00
Marc Cornellà
8d814fdff6 Fast algorithm to determine grep alias flags
This version tries whether grep supports all the flags together
and progressively checks older flags if the grep test fails.
This means only one grep call if all flags are supported, and
one additional call for every flag that's not supported, up to
a maximum of 3 calls.
2020-03-01 14:05:01 +01:00
mattmc3
57b178102c Performance enhancement for lib/grep
- Use $ZSH_CACHE_DIR to store the grep alias with all the right features
- Expire the cache after 24 hours
- See issue #8444
2020-03-01 14:04:36 +01:00
Shi Yan
a8ed1c4e7a Ignore .tox folder in grep 2020-03-01 13:53:04 +01:00
Peter Vandenberk
b4b50f20ac Also set options for egrep and fgrep 2020-03-01 13:51:55 +01:00
Vital Kolas
b6f2cfdb93 Exclude .idea folder from grep search scope 2020-03-01 13:51:52 +01:00
Stephen Heuer
a2cad16790
lib: urlencode hostname in update_terminalapp_cwd (#6245)
Apple's Terminal doesn't open a new tab in your current directory if your hostname has UTF-8 characters in it. Percent encoding the host in addition to the path in update_terminalapp_cwd appears to solve this issue.

Co-authored-by: Marc Cornellà <marc.cornella@live.com>
2020-02-28 19:50:17 +01:00