1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-12 08:50:08 +00:00
Commit graph

487 commits

Author SHA1 Message Date
Dawid Ferenczy
63d7500cf1 Added setting of the window title in Cygwin 2015-12-01 13:52:52 +01:00
Marc Cornellà
b457ae2501 Merge pull request #4651 from ionelmc/patch-1
Add support for "putty" $TERM in termsupport.zsh
2015-12-01 00:05:17 +01:00
Ionel Cristian Mărieș
d55111f200 Support all kinds of putty-like terminal strings. 2015-12-01 00:59:35 +02:00
Marc Cornellà
584e0a6ef9 Use shwordsplit in open_command() 2015-11-30 21:27:58 +01:00
Marc Cornellà
afdfe2391e Add empty string parameter to start command
Otherwise `start` will confuse the first parameter as the title of
a new command prompt if the parameter contains whitespace. That is
because the command to be run will be:

    start "abc def"

which opens a new command prompt window with the title "abc def".
With the added empty string we force the start command to interpret
the passed parameter as the file / command:

    start "" "abc def"

which will be interpreted like `""` is the title and the rest is
the file or command to start.

-------

**NOTE:** this wouldn't be necessary if the start script in msys
was defined differently; that is, if it had the empty string
already incorporated in the script (/usr/bin/start), like so:

```diff
-cmd //c start "${@//&/^&}"
+cmd //c start "" "${@//&/^&}"
```

Notice however that this would make it impossible to use start
setting a different title, so it's probably best to leave it as is.

More info: http://sourceforge.net/p/msys2/tickets/14/

-------

The change `${(z)open_cmd}` is necessary to force zsh to split the
variable by the spaces and interpret it as separate words.

More info: http://zsh.sourceforge.net/FAQ/zshfaq03.html#l17
2015-11-30 21:21:28 +01:00
Mark Ingalls
0a79f1e836 make this work in the git-for-windows SDK
Added an option for the msys value of $OSTYPE
2015-11-30 21:01:15 +01:00
Ionel Cristian Mărieș
711c1bcb40 Add support for "putty" $TERM in termsupport.zsh 2015-11-30 15:16:47 +02:00
Marc Cornellà
fea74b4b34 Fix open_command nohup call
There a syntax error if $cmd_var contains more than one word,
so we drop the current way to prepend nohup and use a simpler
if-else form.
2015-11-29 19:34:10 +01:00
Andrew Janke
f0981d564a termsupport: protect subshell with quotes 2015-11-27 15:58:06 +01:00
Marc Cornellà
ebfba0e539 Drop the use of nohup on OSX for tmux compatibility
Apparently `nohup` is not needed in OSX, and using it has the side
that it may break under tmux with the error

  nohup: can't detach from console: No such file or directory

For now, this commit only drops the use of `nohup` in OSX. But it
*may* not be necessary under other similar platforms.
2015-11-27 15:40:31 +01:00
Marc Cornellà
56345c26fb Merge pull request #4473 from apjanke/5_1_1-bracketed-paste-hack
Disable bracketed-paste-magic in zsh 5.1.1, where it is buggy
2015-10-20 08:26:15 +02:00
Robby Russell
b28db6b475 Merge pull request #4475 from apjanke/diagdump-5.1-fix
diagnostics: fix for reserved-word changes in zsh 5.1
2015-10-13 18:01:52 -07:00
Robby Russell
dc06e96e9c Merge pull request #4254 from apjanke/copyfile-portability
Cross-platform clipboard clipcopy() and clippaste()
2015-10-09 07:15:53 -07:00
Andrew Janke
d15521d09d diagnostics: fix for reserved-word changes in zsh 5.1
Reference:
https://github.com/zsh-users/zsh/blob/zsh-5.1.1/NEWS#L20-L32
2015-10-08 22:31:39 -04:00
Andrew Janke
3551745792 Disable bracketed-paste-magic in zsh 5.1.1, where it is buggy
A bracketed-paste-magic bug breaks pasting of CJK and some other characters in zsh 5.1.1.
http://www.zsh.org/mla/workers/2015/msg02680.html
See #4434
2015-10-08 22:13:42 -04:00
Andrew Janke
b6d78df62c clip*: add xsel support 2015-10-05 05:13:11 -04:00
Jeff Smith
2d9df4468f Fix 'ack-grep' bug for non-ubuntu users
Redirect STDERR along with STDOUT when looking for ack-grep
2015-10-03 18:39:41 -07:00
Robby Russell
5d24ba4228 Merge pull request #3165 from hbin/fix-alias-afind-osx
The executable command on Mac OSX is 'ack' rather than 'ack-grep'.
2015-10-03 14:33:10 -07:00
Andrew Janke
e4fdb08365 Merge branch 'master' into copyfile-portability 2015-09-28 08:52:03 -04:00
Robby Russell
b5a5bc9ae5 Merge pull request #4337 from iCross/master
fix url-quote-magic not working issue
2015-09-26 09:35:12 -07:00
Robby Russell
f186b62704 Merge pull request #4387 from mbologna/fix_git_equal_remote
Uniform git prompt equal remote
2015-09-26 09:34:58 -07:00
shawn
7a636097f8 Correct repo dir
cvs's metadata is under CVS and not .cvs
2015-09-23 18:47:09 -04:00
Michele Bologna
12e99b5334 fix indentation 2015-09-23 11:14:14 +02:00
Michele Bologna
5323954c98 Uniform git prompt equal remote
Uniform git prompt equal remote to all others prompts, setting the correct symbol
(if applicable) to $git_remote_status, instead of echoing it.

It also solves the problem pointed out in #3911
2015-09-23 10:52:24 +02:00
Robby Russell
9bd88bb9aa Merge pull request #4251 from mcornella/fix-completion-dots
Fix completion waiting dots function
2015-09-19 09:01:55 -07:00
Robby Russell
0bb3e0188c Merge pull request #3940 from apjanke/diagnostic-dump-function
Add omz_diagnostic_dump() to help with bug reporting
2015-09-19 08:50:23 -07:00
Robby Russell
8cf88f2b04 Merge pull request #3911 from mbologna/git_remote_status_equal
added ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE
2015-09-19 08:49:57 -07:00
Robby Russell
3c782f78f1 Merge pull request #3582 from apjanke/fold-terminalapp-plugin-into-termsupport
Fold terminalapp plugin in to lib/termsupport
2015-09-19 08:48:03 -07:00
Robby Russell
5e45c16701 Merge pull request #2751 from drm00/fix-openbsd-colorls
add check for colored ls on openbsd. (retry of #2225)
2015-09-19 08:46:13 -07:00
Robby Russell
56cdec7534 Merge pull request #3889 from leycec/compaudit
Repair `zsh` Path Permissions on `oh-my-zsh` Startup under Cygwin
2015-09-19 08:40:34 -07:00
iCross
19c0b185ad fix url-quote-magic not working issue
Incompatibilites between 5.0.8 and 5.1:
bracketed-paste-magic may also be necessary in order to apply url-quote-magic.

Reference: 
a9df6aaa70/Functions/Zle/url-quote-magic (L11)
2015-09-10 14:08:02 +08:00
Marc Cornellà
b42efeb87e Switch off line wrapping in case dots occupy extra line
This commit uses the (hopefully) standard rmam and smam escape sequences
which toggle off and on line wrapping respectively.

This is so that extra dots that don't fit the current line won't be
displayed in the next line, which would in turn make the shell
display a new prompt on the next line after the dots are hidden.

I've added a check for $terminfo rmam and smam values to be sure we have
them before printing them out.

If this commit breaks something post an issue with your terminal
emulator and $TERM value and we'll figure out what went wrong.
2015-09-05 22:47:50 +02:00
Marc Cornellà
6a8d406eaa Use prompt expansion sequence to color red the output
This makes it clearer and possibly more portable for different
platforms.
2015-09-05 22:47:50 +02:00
Marc Cornellà
3976e04035 Use proper if comparison 2015-09-05 22:47:50 +02:00
Andrew Janke
46ddd88fe0 diagnostics: switch to shasum, filter sysinfo using lines
shasum seems more widely available than md5/md5sum, and we don't have to worry about dealing with the different signatures and output formats of md5 and md5sum then.

sysinfo outputs localized message labels, so we can't just grep for "OS Type". But OS is the first thing it outputs, so we can probably just grab those lines by line number. Switched to doing that.
2015-09-04 14:13:00 -04:00
Andrew Janke
5c8b0cc0c1 Add clipcopy() and clippaste() generic cross-platform CLI clipboard functions.
Change copydir, copyfile, and coffee plugins to use them, instead of the Mac-only `pbcopy` command.
2015-08-18 03:49:51 -04:00
Andrew Janke
00eb465830 Merge branch 'master' into fold-terminalapp-plugin-into-termsupport 2015-08-17 20:59:39 -04:00
Andrew Janke
47d19cc564 Add defensive emulate -L zsh to termsupport functions 2015-08-17 20:55:41 -04:00
Andrew Janke
96c34cebae Add a deprecation comment. 2015-08-17 20:51:41 -04:00
Robby Russell
7c60da9e1f Merge pull request #4233 from apjanke/apple-term-no-dupe-folder-in-title
termsupport: avoid repeated dir in window title in Terminal.app
2015-08-12 21:15:59 -07:00
Robby Russell
b8dbd9bfba Merge pull request #4217 from mcornella/standard-open-command
Implement and use a standard, cross-platform open command
2015-08-12 21:14:27 -07:00
Robby Russell
f6a2b97356 Merge pull request #4203 from apjanke/title-protect-promptsubst
termsupport: protect title() with `emulate -L zsh` for portability
2015-08-12 21:12:21 -07:00
Robby Russell
d1ea849fdd Merge pull request #2106 from adepasquale/master
Added ssh-like mosh window title
2015-08-12 21:01:00 -07:00
Andrew Janke
14b4ba83c3 Move urlencode/urldecode functions to core lib 2015-08-09 16:28:47 -04:00
Andrew Janke
17da983442 termsupport: avoid repeated dir in window title in Terminal.app 2015-08-09 15:15:12 -04:00
Marc Cornellà
2d0bfcf818 Implement cross-platform open function open_command()
For now this supports:
- Mac OS X
- Linux (presumably works on all versions)
- Cygwin (Windows)
2015-08-05 00:27:51 +02:00
Andrew Janke
90ea67edf0 termsupport: protect title() with emulate -L zsh
This prevents it from malfunctioning when `setopt prompt_subst` is off.
2015-07-31 22:23:12 -04:00
Andrew Janke
fa25445868 diagnostics: include output file name in dump output 2015-07-22 12:59:39 -04:00
leycec
dcb175d430 Insecure completion handler added.
A new "lib/compfix.zsh" script defining a new handle_completion_insecurities()
function has been added, which handles insecure completion directories by
notifying users of said insecurities and moving away all existing completion
caches to a temporary directory. While intended to be called at startup, this
function is generally callable at any time (e.g., for testing).
2015-07-11 01:52:04 -04:00
Bin Huang
775ac3ad9f The executable command on Mac OSX is 'ack' rather than 'ack-grep'. 2015-07-11 09:32:05 +08:00
Andrew Janke
bca720fa95 diagnostics: include detailed OS version info if possible 2015-07-09 21:18:11 -04:00
Andrew Janke
9813ff5f24 omz_diagnostic_dump: Add umask and $fpath listing.
This helps catch issues with compinit and insecure directories.
2015-06-28 18:00:47 -04:00
Michele Bologna
01e355fb1e In addition to the already existing variables ZSH_THEME_GIT_PROMPT for behind,
ahead and diverged remote, I added ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE.
2015-06-15 10:15:22 +02:00
Ali Afshar
f66a54fb78 Add missing space causing parse error. 2015-06-14 22:29:11 -07:00
Robby Russell
34d3680232 Merge pull request #3838 from forivall/hyphen-insensitive
Add hyphen insensitivity
2015-06-14 22:17:43 -07:00
Robby Russell
422db48e37 Merge pull request #3986 from evilhamsterman/master
Only load url-quote-magic if it is available.
2015-06-14 22:09:13 -07:00
Dan Mills
2fb326513a Only load url-quote-magic if it is available.
Partially fixes #3614
2015-06-10 15:49:47 -07:00
Adam Lindberg
2d40cc0bb3 Add git_prompt_behind and git_prompt_exists
This adds two new theme functions for git:
* `git_prompt_behind` works in a identical fashion to `git_prompt_ahead`
  and will output a format variable (`ZSH_THEME_GIT_PROMPT_BEHIND`) if
  the branch is behind.
* `git_prompt_remote` will output one format variable if the branch
  exists on remote (`ZSH_THEME_GIT_PROMPT_REMOTE_EXISTS`), and another
  if the branch is unpublished (`ZSH_THEME_GIT_PROMPT_REMOTE_MISSING`).

The old `git_prompt_ahead` has been changed. Using git log is subject
to formatting in .gitconfig, which can be overridden and will break
this function. Relying on rev-list is much more stable.
2015-06-10 14:36:55 +02:00
leif.hanack
70c4a27fd6 Added a possibility to display the remote branch and the number of commits you are ahead or behind 2015-06-10 14:36:54 +02:00
Tejas Bubane
1653545282 Recognize comments by default. 2015-06-10 14:36:54 +02:00
Andrew Janke
0bda651dfd Fix the spectrum_ls implementation in spectrum.zsh 2015-06-08 07:19:57 -04:00
Andrew Janke
8142261261 Hide spectrum.zsh var values to avoid junky "set" output to terminal 2015-06-08 07:07:45 -04:00
Andrew Janke
af68165207 Fix name of backed-up zshrc 2015-06-06 11:50:05 -04:00
Andrew Janke
afadb5a7fb diagnostics: add zstyle state to output 2015-06-06 11:04:14 -04:00
Andrew Janke
82c1288cb2 Include some bash rc files; improve formatting; more version info 2015-06-06 01:19:29 -04:00
Andrew Janke
ea6adc5a0a Add omz_diagnostic_dump() to help with bug reports. 2015-05-29 23:22:07 -04:00
Jordan Klassen
66052e2d07 Add hyphen insensitivity 2015-04-29 15:37:39 -07:00
Robby Russell
ff6ca9b856 Merge pull request #3538 from TheLinuxKitten/grep-if-color
Test if --color=auto is a valid option for grep
2015-02-22 10:17:16 -08:00
Robby Russell
efd6d4d593 Merge pull request #3597 from apjanke/no-dot-in-cdpath
Remove '.' from $cdpath to avoid Cygwin breakage
2015-02-21 17:04:24 -08:00
Andrew Janke
88f42b6132 Add support for variant "utf8" locale suffix spelling. Fix dumb bug in iconv call that would cause it to hang. 2015-02-21 16:25:28 -05:00
Andrew Janke
cb37c934c0 Remove unnecessary braces. 2015-02-21 16:00:40 -05:00
Andrew Janke
187cf07c91 For unspecified encodings, assume it's UTF-8 or compatible (e.g. ASCII) and muddle through without character encoding conversion. 2015-02-17 00:54:54 -05:00
Andrew Janke
702ff1ca91 Add support for non-UTF-8 encodings in caller's locale. 2015-02-17 00:49:53 -05:00
Andrew Janke
6ccf67a077 Do not put explicit dot in $cdpath, since it causes problems on Cygwin due to an underlying zsh bug. 2015-02-16 10:24:22 -05:00
Zhiming Wang
2790a5e565
Bring back -h option to ls variants
The -h options in l, ll, and la were lost in 25b1cd6. There's no reason
to remove them.
2015-02-15 11:37:28 -08:00
Andrew Janke
3a18c33f17 In termsupport, use LC_CTYPE instead of LANG to enable byte-by-byte text processing. LANG doesn't seem to actually work. 2015-02-14 20:30:03 -05:00
Andrew Janke
a9e97e5d2d Remove terminalapp plugin and fold its implementation in to lib/termsupport.zsh. Replaces the redundant Terminal.app support that was recently added to termsupport. 2015-02-14 19:05:27 -05:00
Marc Cornellà
3704fbb71e Extract CWD notifier back out of auto-title hooks 2015-02-13 15:57:18 +01:00
Robby Russell
ef7e53a78d Merge pull request #3568 from mcornella/apjanke-title-disable-check
Repost #3426: move DISABLE_AUTO_TITLE check to hooks
2015-02-10 11:49:56 -08:00
Marc Cornellà
0edf416bea Temporarily delete over-engineered solution 2015-02-10 20:38:06 +01:00
frozen_dude
448e966129 Fix for bad LC_CTYPE entry
LANG is a colon-separated list of prefered locales; LC_CTYPE is single entry,
therefore we need to remove all but one entry.

Also, there is no need setting it if it is already set (LC_ALL also sets
LC_CTYPE, so we check it too).
2015-02-10 20:37:35 +01:00
Marc Cornellà
2e41d06b76 Use quoted $TERM value everywhere 2015-02-10 19:53:40 +01:00
Marc Cornellà
b7e5dd35ef Quick-fix code style 2015-02-10 19:52:58 +01:00
Andrew Janke
4fc6dccb42 term: Move DISABLE_AUTO_TITLE check to hooks
Move the DISABLE_AUTO_TITLE check from title() to the preX hook
functions that call it, to allow the title() function to be used
directly by user or other callers.
2015-02-10 19:38:11 +01:00
Marc Cornellà
2193135ebc Clean up appearance lib file and redundant colors calls in other files 2015-02-10 19:22:50 +01:00
Marc Cornellà
51946eb3ce Implement deletion of sl alias as per #3055 2015-02-10 19:22:39 +01:00
LFDM
4b4292a496 Fix a typo 2015-02-10 19:22:39 +01:00
LFDM
83c4e06206 Moves a bindkey call from misc to key-bindings. 2015-02-10 19:22:39 +01:00
LFDM
101149b1ae Moves remaining aliases to misc and deletes file.
There were only three aliases left in aliases.zsh
File deleted!
2015-02-10 19:22:39 +01:00
LFDM
d33b0aae91 Refactors history alias and moves it.
More compact case statement instead of the ugly if elif... else
statement. Moves it to history.zsh
2015-02-10 19:22:39 +01:00
LFDM
25b1cd687b Brings all directory stuff to directories.zsh
- Cleans out aliases.zsh.
- Removes unneeded cd function.
2015-02-10 19:22:38 +01:00
Robby Russell
c3eb54839a Merge pull request #3525 from apjanke/term-pwd-in-precmd
Move pwd update output to precmd to avoid contamination
2015-02-10 07:27:03 -08:00
Andrew Janke
be7028012e Reword comments on termsupport internal functions. 2015-02-04 01:00:51 -05:00
The Linux Kitten
f2130fa1a3 Test if --color=auto is a valid option for grep 2015-02-02 20:49:24 +01:00
Robby Russell
550ccca91c Merge pull request #3478 from stephenrjohnson/custom_cache_dir
Allow custom cache dir
2015-01-31 06:23:50 -06:00
Andrew Janke
5f79ab5547 Move chpwd update output from chpwd hook to precmd to avoid
contaminating script/function output
2015-01-27 21:00:07 -06:00
Stephen
bf7b9165fd Allow custom cache dir
We are running oh-my-zsh on a shared install and the only issue is each
user having a custom cache dir. This will allow us to set the cache dir
to ZSH_CACHE_DIR=~/oh-my-zsh/cache/ .
2015-01-08 16:01:16 +00:00
Andrew Janke
7295e38885 termsupport: add chpwd hook for setting pwd in Apple Terminal.app 2014-12-21 15:05:22 -05:00
Robby Russell
9b352030b7 Merge pull request #3409 from unixorn/prevent-variable-clobbering
Add quoting to nvm.sh
2014-12-19 20:21:33 -08:00
Joe Block
16d0768305 Quote path in case $HOME has a space in it.
I've seen stranger things on OS X, unfortunately.
This reverts commit 1f5cecee4768be192e439a72a873a6cfe8720927.
2014-12-16 13:22:31 -08:00