summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2018-04-24Check for Microsoft's WSL in open_command (#6751)Marc Cornellà
This will work only on files and directories in a DrvFs mount, i.e. that can be translated to a Windows drive path. For example: /mnt/c/Users/user. Files and folders inside the LXSS directory can't be handled in Windows, they must be ONLY used by the WSL subsystem. That's why you won't be able to open your $HOME directory, for instance. See https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-not-change-linux-files-using-windows-apps-and-tools/
2018-04-22Increment HISTSIZE to fix hist_expire_dups_firstMarc Cornellà
This fixes the old behavior which made it so all duplicates would be deleted if the command history filled up with unique events. > You should be sure to set the value of HISTSIZE to a larger number > than SAVEHIST in order to give you some room for the duplicated > events, otherwise this option will behave just like HIST_IGNORE_ALL_DUPS > once the history fills up with unique events.
2018-04-22Remove duplicate option append_historyMarc Cornellà
The option inc_append_history already has the same effect.
2018-04-22Use zparseopts to get passed argumentsMarc Cornellà
2018-04-22Allow overriding -l flag in historyMarc Cornellà
2018-04-22Ensure builtin fc is used (see #3001)Marc Cornellà
2018-04-22Organize history.zsh file and improve commentsMarc Cornellà
2018-04-22Simplify `if' into oneliner, allow spaces in HISTFILEMarc Cornellà
2018-04-22Change history alias into a functionMarc Cornellà
This commit changes the history alias into a function which puts the passed arguments before `-l 1`. It also provides a temporary workaround to the lack of a `history -c` command in zsh. For more information see issues 739 and 789.
2018-04-15Fix git_commits_{ahead,before} when no upstream branch is defined (#6658)Jacopo De Simoi
If @{u} is not defined, git rev-list will give an error; redirect to stderr the error and deal with this case in what follows.
2018-01-22Add match for `MM` (result of `git commit -p` on a single changed file) to ↵Kimberly Zick
git_prompt_status (#3632)
2017-11-14With zsh 5.4 a simple "local FLAGS" meant as an array must be explicitly ↵catull
declared so. This fix avoids the dreaded "parse_git_dirty:3: FLAGS: attempt to assign array value to non-array". (#6414)
2016-12-30 'lib/functions.zsh: Solve typos'Patrick José Pereira
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2016-12-30 'lib/completion.zsh: Solve typos'Patrick José Pereira
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2016-11-16fix(env): Do not override misc env set before sourcing oh-my-zsh (#5231)Derek Frank
Sourcing oh-my-zsh happens in zshrc, which will override settings of profile and zshenv. Treat misc values, `PAGER` and `LESS`, as default settings without overriding existing values. Fixes: #1, robbyrussell/oh-my-zsh#3016
2016-11-03Fix #5604: No DIR ( directory ) colors (#5605)mingang.he
2016-11-02Fix invalid "ls -G" alias.Eduardo Cuomo
2016-11-02Check dircolors settings before using gls on darwin (#5570)Marc Cornellà
`gls` seems to be installed by default or on most macOS systems, but its default color scheme sucks. This fix will make sure to only use it if it has been customised prior to running OMZ. Related: #5516, #5520.
2016-10-11Fix ls coloring in MacOS if gls is not installedMarc Cornellà
Fixes #5520.
2016-10-10Fix ls colouring for Darwin. (#5516)rossmcf
2016-10-10Use $+commands to check the existence of a command in clipboard.zsh. (#5519)Hong
2016-10-10Use OSTYPE instead of uname whenever possible for better speed. (#5496)Hong
2016-10-10Take advantage of LS_COLORS for the color of completion if GNU ls is used. ↵Hong
(#5510)
2016-10-04Fix style of theme-and-appearance.zshMarc Cornellà
2016-10-04Only set default LS_COLORS if not set beforeMarc Cornellà
Also, force the use of Bourne-style shell syntax with `dircolors -b`.
2016-10-04Use `$commands[]` to check for command existenceMarc Cornellà
2016-10-04set better default colors for GNU ls instead of none.Hong Xu
GNU coreutils ship a color setup command by default which can be used to set a good default color theme for ls: https://www.gnu.org/software/coreutils/manual/html_node/dircolors-invocation.html
2016-09-22Fix styling of lib/completion.zshMarc Cornellà
2016-09-22Fix hyphen and underscore filename completionGravemind
This deletes the previous hack that allowed completing files with the extension: e.g. `abcd.z` to `abcdefg.z`. It is still possible to use `abcd[TAB].z`, and hyphens or underscores are very much more important than this other trick. Source: https://github.com/robbyrussell/oh-my-zsh/issues/1398#issuecomment-169163149 Signed-off-by: Marc Cornellà <marc.cornella@live.com>
2016-09-08Fix git_prompt_status() not showing ahead/behind/diverged status correctly ↵Yuichi Tanikawa
(#5388)
2016-09-05git: output nothing when no commits ahead or behindMarc Cornellà
This fixes old git_commits_ahead behavior and changes git_commits_behind to have the same behavior. Fixes #5355
2016-08-09Replace /bin/sh with sh for portability (#5291)Fredrik Fornwall
This makes things work even on system lacking /bin/sh, such as on non-rooted Android systems.
2016-08-07nvm plugin improvements (#5265)Luke Childs
* Export $NVM_DIR if it doesn't exist and use it when looking for nvm * Use $NVM_DIR when looking for nvm for completion * Use $NVM_DIR when looking for nvm in nvm_prompt_info
2016-08-01Updated git_commits_ahead function (#5247)Steven
* Function wasn't returning correct value * Updated underlying git command * Kept echo command from previous function for backwards compatibility * Kept function consistent with git_commits_behind
2016-07-15lib/git.zsh: Added git_commits_behind function (#4450)Steven
* Added git_commits_behind function * Added 'command' to git_commits_behind function * git_commits_behind code review changes
2016-05-12Cleanup theme-and-appearance.zshMarc Cornellà
2016-05-12Delete cdablevars option by defaultMarc Cornellà
Fixes weird autocompletion of directories and named users. Fix #4864
2016-03-31Add git user profile functions for prompt displayAesop Wolf
2016-01-13Re-added $ZSH_THEME_GIT_PROMPT_EQUAL_REMOTEMichele Bologna
Re-added $ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE variable which was removed in 9f55213
2015-12-17Put `local var` declaration in its own line in lib/git.zshMarc Cornellà
In places, the local statement will override the exit code and the written command won't have the effect intended when it was written. For example, when it's not inside a git repo the exit code won't be true, but the local statement will make it true regardless. See #4708.
2015-12-14Move current_branch() from git plugin to core lib/git.zshAndrew Janke
Fixes #4085: core -> plugin dependency issue. Rename it to git_current_branch for clarity that it's git-specific. Update all plugins that were calling it to use new name. Fix variable leaks by making more variables in lib/git.zsh local. Have lib/git.zsh use [[ ]] instead of [ ] everywhere.
2015-12-14Fix indentationmoyamo
2015-12-14Default to using terminfo to set the terminal titlemoyamo
Currently, the title is only set on supported terminals (i.e. xterm, urxvt, screen etc.). Using terminfo entries to set the terminal title adds support for many more terminals.
2015-12-14Better research history with arrow keysdesrum_m
This change enables UP-arrow and DOWN-arrow full-line history completion. For example, if you write `git clone` and press UP: - Before this change, it will use the last command that starts with `git`. - After this change, it will use the last command that starts with `git clone`.
2015-12-13Merge pull request #3966 from apjanke/fix-spectrum-lsMarc Cornellà
Make spectrum_ls implementation consistent with $FG and spectrum_bls
2015-12-13Merge pull request #3965 from apjanke/spectrum-hide-codesMarc Cornellà
Hide spectrum.zsh var values to avoid junky output to terminal
2015-12-13Add back the `-` alias to go to the previous directoryMarc Cornellà
The alias was removed in #3564. A couple of users were using it, so I'm adding it back.
2015-12-01Cleanup update_terminalapp_cwd functionMarc Cornellà
2015-12-01Quote all variables in if statementsMarc Cornellà
2015-12-01Use a case structure to id terminal typesMarc Cornellà