Commit Graph
82 Commits
Author SHA1 Message Date
Marc Cornellà 82ae41ca4c Reorder xcode plugin file 2015-09-07 12:09:08 +02:00
Marc Cornellà 213f46a296 Add xcselv documentation in the README 2015-09-07 12:08:50 +02:00
Marc Cornellà d95589d4e4 Add README for the xcode plugin 2015-09-05 23:17:38 +02:00
Marc Cornellà ec3694c788 Make simulator dependant of currently active dev directory
This also gets rid of `xcode-select` command-not-found errors.
2015-09-05 22:47:52 +02:00
Marc Cornellà 24bdd8e29a Replace xcsel function with just an alias 2015-09-05 22:47:52 +02:00
Marc Cornellà 6a830f39b6 Return error if no xcode files where found 2015-09-05 22:47:52 +02:00
Marc Cornellà cbdad588e6 Use zsh globbing instead of ls + grep in xc function
Uses zsh arrays and globbing to find .xcworkspace and .xcodeproj files.
2015-09-05 22:47:52 +02:00
Marc Cornellà 38d25a3359 Update taskwarrior completion to latest version (Jul 26 2015)
See relevant commit at:
https://git.tasktools.org/projects/TM/repos/task/commits/3158883dc4d251
2015-09-05 22:47:51 +02:00
Marc Cornellà 75844fe1a1 Put relevant documentation into README file 2015-09-05 22:47:51 +02: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
Marc Cornellà c481c62bc9 Refactor and clear up README file 2015-09-02 00:26:16 +02:00
Marc Cornellà d982e1200f Reorder alias definitions 2015-09-02 00:26:15 +02:00
Marc Cornellà 663ac56d54 Prettify frontend help output and clean up logic 2015-09-02 00:26:14 +02:00
Marc Cornellà f1472f1f64 Simplify frontend-search function with assoc array
Also adds the lodash URL (which was missing) and uses https on those websites
that support it.
2015-09-02 00:26:11 +02:00
Marc CornellàandIgor Dejanovic 7f64092361 [vim-interaction plugin] Escaping special chars in file names and simplifying code. 2015-09-01 19:07:49 +02:00
Marc Cornellà 9121f3e9d7 Merge pull request #4 from wkentaro/fix-git-prompt-plugin
Show tag name when detached status if possible
2015-08-17 12:43:23 +02:00
Marc Cornellà be667a24b0 Remove obsolete comment 2015-08-17 01:05:37 +02:00
Marc Cornellà 3c698743fa Clean up gitstatus.py 2015-08-16 23:21:48 +02:00
Marc Cornellà 30bed07e9c Parse UTF-8 output from git status 2015-08-16 23:02:16 +02:00
Marc Cornellà 6ff53d173b Cleanup of git-prompt plugin file 2015-08-16 23:02:14 +02:00
Marc Cornellà 1d133ff11f Cleanup the rest of gitstatus.py 2015-08-16 23:02:13 +02:00
Marc Cornellà 5642014ff1 Pull in simplified version from @wkentaro
This version uses `git status --porcelain` instead of making
multiple calls to `git status`.
2015-08-16 23:02:12 +02:00
Marc Cornellà 6443626a6b Pull in latest version from olivierverdier/zsh-git-prompt 2015-08-16 23:02:11 +02:00
Marc Cornellà c6a5f6efb4 Check that list_size value is not zero before division 2015-08-16 22:40:52 +02:00
Marc Cornellà 88243b846a Use right variable name to avoid zero-length array
This fixes the typographic error that always assigned an undefined
array to `$names`, which made `$list_size` = 0 and triggered a
divide by zero error on the next line.
2015-08-16 22:26:33 +02:00
Marc Cornellà be10229659 Exit only if the fbterm session closed correctly
This prevents the previous behavior that exitted the zsh session
even if fbterm didn't start correctly.
2015-08-09 22:45:02 +02:00
Marc Cornellà be5dcb8a59 Check if fbterm is installed and use $TTY variable 2015-08-09 21:55:52 +02:00
Marc Cornellà 3fe3ce8bdc Revert "Move custon *.zsh file sourcing up so that they can load plugins and other things that come after."
This reverts commit a28dbc8393.
2015-08-08 01:31:02 +02:00
Marc Cornellà ccb0ae5720 Add quotes to support folders with whitespace 2015-08-07 22:45:46 +02:00
Marc Cornellà b760a10cb2 Use standard open command in fasd and lighthouse plugins 2015-08-05 01:18:42 +02:00
Marc Cornellà d1d06b5675 Use standard open command in current plugins
Substitutes the current duplicate logic for the standard
and cross-platform function open_command in plugins:

  frontend-search, jira, node, web-search
2015-08-05 00:57:40 +02: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
Marc Cornellàandncanceill 26c7adf110 Revert "Added migration notification for rails plugin"
This reverts commit 1493d88e3f, made
to put a deprecated notice on rails3 and rails4 plugins, so that
users would migrate to the unified rails plugin.

It's been 1.5 years since that, so everyone should be migrated to
the good one.
2015-06-13 11:05:38 +02:00
Marc Cornellà cc639287d2 Round 3 of batch-closing obsolete issues 2015-06-03 19:36:10 +02:00
Marc Cornellà 152a751342 Revert usage of install.ohmyz.sh URL, until HTTPS support.
This reverts commit b6cbba9dfe.
2015-02-19 15:50:08 +01:00
Marc Cornellà 4b20bfe0ee Fix first-tab completion in task command
This is done by calling `_task` at the end of the _task completion file,
as is standard in completion files.
2015-02-13 17:29:44 +01:00
Marc Cornellà 3704fbb71e Extract CWD notifier back out of auto-title hooks 2015-02-13 15:57:18 +01:00
Marc Cornellà 0edf416bea Temporarily delete over-engineered solution 2015-02-10 20:38:06 +01:00
Marc Cornellà 732c7b8070 Simplify adding workon_cwd to chpwd hook 2015-02-10 20:32:52 +01:00
Marc Cornellà b62911660d Organize error checking in virtualenwrapper plugin 2015-02-10 20:32:52 +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
Marc Cornellà 6fb866183d Remove composer.json file requirement
This is because we can't be sure which arguments require a json file
and which don't, so the `else' statement will always be difficult to
check for correctness.
2015-02-10 19:32:59 +01:00
Marc Cornellà 02d75684f3 Force using https in Yandex search engine 2015-02-10 19:32:52 +01:00
Marc Cornellà e8daf8150e Fix yahoo search URL in web-search plugin 2015-02-10 19:32:52 +01:00
Marc Cornellà c45885093f Add support for cygwin open in web-search plugin 2015-02-10 19:32:52 +01:00
Marc Cornellà adaea31ca0 Silence nohup output in web-search plugin 2015-02-10 19:32:52 +01:00
Marc Cornellà 80ba54a94f Add Yandex support to web-search plugin 2015-02-10 19:32:52 +01:00
Marc Cornellà 80d856e165 Clean up web-search plugin logic to allow easier changes 2015-02-10 19:32:52 +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
Marc Cornellà 282240bf37 Account for iTerm2 sent keys in dircycle plugin 2015-02-10 19:18:15 +01:00
Marc Cornellà 999bab187c Emulate zsh in zlewidgets instead of static setopt command
This way the user can keep their preferred pushd syntax while enabling
us to use a standard syntax in our defined functions.

To explain further, without a clear value on the PUSHD_MINUS option, we
could be changing the +1/-0 values all we want, that some user would
find that it didn't work for him.

We have two options, then:
- Setting a particular value, which was my first approach.
- Using `emulate -L zsh` to ensure all options defined in the function's
  body won't be passed along to the main zsh instance.
  For more info see:
  http://zsh.sourceforge.net/Doc/Release/Shell-Builtin-Commands.html#index-emulate
2015-02-10 19:18:15 +01:00
Marc Cornellà e93fd939ad Run pushd command directly and trigger prompt redraw 2015-02-10 19:18:15 +01:00
Marc Cornellà 5fe22fcbc6 Clean up and fix +1/-0 syntax to work as expected
This change follows this proposed behaviour:

 Ctrl+Shift+Left:  move to last visited directory
 Ctrl+Shift+Right: move to next visited directory

an alternative behaviour would be:

 Ctrl+Shift+Left:  move directory to the left in `dirs` output
 Ctrl+Shift+Right: move directory to the right in `dirs` output

It also introduces `setopt nopushdminus` as a way to standardise
pushd syntax. It's value wasn't clear before, which has been the
cause of so many pull requests regarding this plugin not working
in some environments.
2015-02-10 19:18:14 +01:00
Marc Cornellà e60458793a Switch newer-than logic to get the desired behavior
In the old version, the function returned true (0) if the cache file
was newer than the Cakefile, which was *always* unless the Cakefile
had been updated. Therefore we generated the file every time unless
the Cakefile was updated, which was precisely when we needed to
regenerate the cache file.

Now it generates the cache file only when the Cakefile has been
updated.
2015-02-01 23:32:38 +01:00
Marc Cornellà 711843153d Tidy up the grep.zsh library 2014-12-13 19:52:49 +01:00
Marc Cornellà 0190eb084b Use unaliased grep in flag check 2014-12-13 19:45:04 +01:00
Marc Cornellà cf586b54b8 Ignore .bzr folders in grep too 2014-12-13 19:45:02 +01:00
Marc Cornellà 0bd3c9996f Extract VCS folders definition to avoid repetition 2014-12-13 19:44:38 +01:00
Marc Cornellà a301f567e3 Switch back to oh-my-zsh.hide-dirty setting again
Commit 81004dfaba reverted the change
in 9b811fb625 when editing the merge
conflict from #2928.

This commit fixes that so that we don't make the same mistake again.

First seen in http://git.io/Cdaj5Q
2014-11-19 18:40:18 +01:00
Marc Cornellà 95d795e8ca Change all hostname calls for $HOST or $SHORT_HOST 2014-11-06 18:33:56 +01:00
Marc Cornellà 4310a15de5 Change all pwd calls for $PWD variable
This avoids spawning additional processes as $PWD **always** contains
the current working directory.
2014-11-06 18:33:56 +01:00
Marc Cornellà 74177c5320 Change all whoami calls for $USER variable
This avoid spawning additional processes, as the $USER variable will
**always** contain the current logged-in user.
2014-11-06 18:33:56 +01:00
Marc Cornellà b452cafb16 Follow-redirect and silent mode curl throughout gitignore
This commit completes previous efforts and standardizes both curl commands
into using silent mode and following redirects in case the URL changes
again in the future.
2014-10-22 18:13:15 +02:00
Marc Cornellà 36e05e95ad Don't set auto_name_dirs because it messes up prompts
From http://zsh.sourceforge.net/Doc/Release/Options.html#Completion-4

> AUTO_NAME_DIRS
> Any parameter that is set to the absolute name of a directory immediately
> becomes a name for that directory, that will be used by the ‘%~’ and
> related prompt sequences, and will be available when completion is performed
> on a word starting with ‘~’.
> (Otherwise, the parameter must be used in the form ‘~param’ first.)

Explained in more detail in
https://github.com/wayneeseguin/rvm/issues/3091#issuecomment-60083194

Related issues:
https://github.com/robbyrussell/oh-my-zsh/issues/2857
https://github.com/robbyrussell/oh-my-zsh/issues/3238
https://github.com/wayneeseguin/rvm/issues/3091
2014-10-22 15:39:27 +02:00
Marc Cornellà 142a6c7fd5 Fix pass zsh completion and autoloading
When autocompleting from `pass <TAB>', sometimes the following errors
appear:

  _values:compvalues:10: not enough arguments
  find: `/home/user/.password-store': No such file or directory
  _values:compvalues:10: not enough arguments
  find: `/home/user/.password-store': No such file or directory

The `_values' error happens when there is no password-store folder *or*
there are no passwords in pass; the `find' error only when there is no
password-store folder.

We can trace it back to line 108, which contains the only `_values'
statement that is executed when we autocomplete from pass. We confirm
this by following the trail of execution, which is

  _pass -> _pass_cmd_show -> _pass_complete_entries ->
        -> _pass_complete_entries_helper

If we try running the command inside `$()' on line 104, we see that it
returns nothing and the output is blank. This means that `_values' only
receives 1 of its 2 mandatory parameters, therefore the above error is
triggered (not enough arguments).

That is unless we don't have a password-store folder, in which case the
`find: [...] no such file or directory' error is *also* triggered.

We solve the first error by supplying a default value of "" if the
command outputs nothing, using the zsh construct ${var:-else}.

We solve the second error by redirecting the find command's stderr output
to /dev/null, so the error is effectively suppressed.

* * * *

This patch also fixes the first tab completion, which currently only
loads the completion function definition.

We do this by adding a `_pass' statement at the end of the file, which
runs the `_pass' completion function after loading its definition.
This is the standard way an autoloaded function works; for other examples
look at zsh's official completion files.
2014-08-29 00:39:33 +02:00
Marc Cornellà 17dd5792b4 Update pass completion to upstream
Conflicts:
	plugins/pass/_pass
2014-08-29 00:39:33 +02:00
Marc Cornellà 1e2abe5d4e Categories of issues in oh-my-zsh (work-in-progress) 2014-08-29 00:38:12 +02:00
Marc Cornellà 1aadd63cfc Add CONTRIBUTING.md file general structure 2014-08-29 00:38:12 +02:00
Marc Cornellàandncanceill 340da08b9a Add missing quotes to within-bundler-project function 2014-06-28 10:12:19 +02:00
Marc Cornellàandncanceill fbf4a78acf Show user prompt in gnzh theme regardless of UID
Fixes #2008.
2014-06-06 11:27:53 +02:00
Marc Cornellà fcfa323974 Use cache folder inside $ZSH, delete with unaliased rm 2014-04-18 17:07:23 +02:00
Marc Cornellà 5137e0e509 Escape % in $CMD variable
Fixes formatting on some rare cases when a percent ends up
in the $CMD variable, like these below:

- When assigning a variable, $CMD ends up with the second parameter;
in this case, $CMD will contain '+%s%N', messing with the syntax:

 $ a=`date +%s%N`

- A function (or command in general) that contains a percent symbol:

 $ to\%() { echo $(( $1 * 100 / $3))\% } # $CMD=to%()
 $ to% 2 of 10 # $CMD=to%
2014-03-25 21:14:20 +01:00
Marc CornellàandPhil Eichinger c0e3c553bc Fix export syntax of $GREP_OPTIONS
Fixes #2641, #2642
2014-03-25 16:47:58 +01:00
Marc Cornellà 12e30faaca Fix export syntax of $GREP_OPTIONS
Fixes #2641, #2642
2014-03-23 02:09:38 +01:00
Marc Cornellà a951600b4e Avoid 'title:parse error' with single quotes in $CMD
Fixes #2182
2014-02-21 22:16:12 +01:00
Marc Cornellà 3e5de21dc5 Revert previous commit, escape % 2014-02-21 22:16:12 +01:00
Marc Cornellà b73ced397f Use single quotes also in $LINE definiton 2014-02-21 22:16:12 +01:00
Marc Cornellà b0fbe0d11a Avoid evaluating special chars in $LINE on title command (fixes #2234) 2014-02-21 22:16:12 +01:00