summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2020-07-06lib: prefix diff call with command to bypass diff aliasesMarc Cornellà
See https://github.com/ohmyzsh/ohmyzsh/pull/8807#issuecomment-652697704
2020-07-03cli: beauty touches on 'omz pr test' commandMarc Cornellà
2020-07-01lib: enable diff color (#8807)Monson Shao
2020-06-30Handle unset variables in various parts of the codebase (#8944)Patrick Moore
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-19core: add title support for mlterm (#8303)joshuashaffer
2020-06-03lib: don't override bigger HISTSIZE and SAVEHIST values (#8993)Marco Trevisan
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-05-21core: remove inc_append_history option (#8048)Benoit GALATI
2020-05-20Revert "core: enable hist_reduce_blanks"Marc Cornellà
This reverts commit cbd6fbe7a7c3ef260f497704092dc43f2e953c3f. Fixes #8949
2020-05-20Prefix cd calls with `builtin` (#8937)Jacob Menke
2020-05-16core: enable hist_reduce_blanksMarc Cornellà
Fixes #8722
2020-05-11core: fix zstyle definition of use-cacheMarc Cornellà
2020-05-01core: move core folder to lib, for nowMarc Cornellà
2020-04-05lib: speed up slow parts of the lib files; other small fixesMarc Cornellà
2020-03-05lib: support konsole* $TERM in title function (#8035)Marc Cornellà
2020-03-03lib: automatic title: replace fg with description from jobs (#7982)Marc Cornellà
* 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-03lib: clean up termsupport.zshMarc Cornellà
2020-03-03Use $jobstates and $jobtexts to look for jobsMarc Cornellà
`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-03lib: use `command` to run rm in upgrade function (#8696)Marek Dědič
2020-03-02lib: use grep-alias cache only if ZSH_CACHE_DIR is writableMarc Cornellà
Fixes #8693
2020-03-01Refactor grep.zsh fileMarc Cornellà
- 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-01Fast algorithm to determine grep alias flagsMarc Cornellà
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-01Performance enhancement for lib/grepmattmc3
- 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-01Ignore .tox folder in grepShi Yan
2020-03-01Also set options for egrep and fgrepPeter Vandenberk
2020-03-01Exclude .idea folder from grep search scopeVital Kolas
2020-02-28lib: urlencode hostname in update_terminalapp_cwd (#6245)Stephen Heuer
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-28lib: add support for clippaste in WSL using powershellMarc Cornellà
Source: https://github.com/microsoft/WSL/issues/4852#issuecomment-579616808
2020-02-27lib: add termux commands to clipboard.zsh (#6243)j
Closes #6243
2020-02-27lib: add support for clip.exe clipboard copy in WSLMarc Cornellà
2020-02-27Merge branch 'master' into clipboardMarc Cornellà
2020-02-24lib: delete upgrade lock in upgrade_oh_my_zshMarc Cornellà
Provides a different solution to #8332 and #8333
2020-02-11lib: load bash completion functions automaticallyMarc Cornellà
Fixes #8614
2020-02-10lib: add git function to determine repository name (#4989)Evan Chiu
Closes #4989 Co-authored-by: Marc Cornellà <marc.cornella@live.com>
2020-01-16lib: add MSYS2 support to clipboard integration (#8542)Andras Svraka
2019-11-19Use safer append to hook function arrays (#8406)Jacob Tomaw
Use add-zsh-hook to add functions to hooks. That way they won't be added again when doing `source ~/.zshrc` multiple times. Co-authored-by: Marc Cornellà <marc.cornella@live.com>
2019-11-06Fix badly resolved rebase conflictMarc Cornellà
2019-11-06Clean up ignore submodules logic in parse_git_dirtyMarc Cornellà
2019-11-06Add an option about git submodules to ignoreWang Guan
$GIT_STATUS_IGNORE_SUBMODULES can be used to specify handling of submodules. It can be: not set : ignore dirty submodules (this was default zsh behavior) "git" : do not use "--ignore-submodules" and let git choose, this obeys setting in .gitmodules other : comes into "--ignore-submodules=$GIT_STATUS_IGNORE_SUBMODULES"
2019-10-16lib: allow alias expansion in _ sudo alias (#8268)Shahin Sorkh
2019-09-19Fix WSL check for WSL 2 and simplify nohup in open_commandMarc Cornellà
WSL 2 changes the output of `uname -r`. For instance, WSL 1: 4.4.0-18980-Microsoft WSL 2: 4.19.67-microsoft-standard Since WSL 2 lowercases the M, we can match for the rest of the string which remains lowercase throughout both versions. Another option would be to match for both upper- and lower-case Ms, like that: $(uname -r) = *[Mm]icrosoft* Fixed use of nohup in open_command where it was only necessary for xdg-open (and actually harmful for cmd.exe in WSL 2). The current logic is simpler and more future-proof.
2019-08-19lib: delete LC_CTYPE locale setting which causes problemsMarc Cornellà
Fixes #7942
2019-07-14clipboard: Fix bad expansion of exit-code testRobert Estelle
2019-07-14clipboard: Fix tmux clipcopy after testingRobert Estelle
Tmux must have special handling for /dev/stdin since it's managing the terminal itself. This was tested with tmux-2.9a on macOS.
2019-07-14clipboard: Fix "cilppaste" -> "clippaste" typoRobert Estelle
2019-07-12clipboard: Add support for several more clipboardsRobert Estelle
This implements essentially the same heuristic as neovim, with the additional (existing) special support for Cygwin. See: https://github.com/neovim/neovim/blob/e682d799fa3cf2e80a02d00c6ea874599d58f0e7/runtime/autoload/provider/clipboard.vim#L55-L121 - pbcopy, pbpaste (macOS) - cygwin (Windows running Cygwin) - wl-copy, wl-paste (if $WAYLAND_DISPLAY is set) - xclip (if $DISPLAY is set) - xsel (if $DISPLAY is set) - lemonade (for SSH) https://github.com/pocke/lemonade - doitclient (for SSH) http://www.chiark.greenend.org.uk/~sgtatham/doit/ - win32yank (Windows) - tmux (if $TMUX is set)
2019-07-12clipboard: Avoid unnecessary re-detection each timeRobert Estelle
Previously, OS detection would happen on each invocation. This makes it happen once (unless it fails, in which case it will try again on the next invocation). This has the additional benefit of localizing the platform-specific checks and commands, too, versus spreading them out in separate functions.
2019-07-12clipboard: Reduce unnecessary special-casing on stdinRobert Estelle
Ideally the parameter would just be removed-users could always just do "clipcopy < some-file". but removing the parameter would break backwards compatibility. In any case, this simplifies the logic considerably.
2019-07-07Avoid error messages when there is no jobErik Demaine
2019-07-06Automatic title: Replace fg with description from jobsErik Demaine
2019-05-11lib: add ability to disable magic functionsMarc Cornellà
Fixes #5499 Fixes #5569 Fixes #6338 Fixes #6654 Fixes #6255 Fixes #7632 Closes #7763 Co-authored-by: Daniel Galán y Martins <git@galan.de>