Commit Graph

48 Commits

Author SHA1 Message Date
Marc Cornellà 6bff079332
Allow completion of dot directories (#6803)
Fixes #3775, fixes #6543
2018-05-07 18:15:01 +02:00
Patrick José Pereira cedc4fce88 'lib/completion.zsh: Solve typos'
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2016-12-30 10:34:16 -02:00
Marc Cornellà 4e12024b0b Fix styling of lib/completion.zsh 2016-09-22 00:44:25 +02:00
Gravemind 0d897cca74 Fix hyphen and underscore filename completion
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-22 00:43:30 +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
Jordan Klassen 66052e2d07 Add hyphen insensitivity 2015-04-29 15:37:39 -07: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
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
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
Moinak Ghosh 5f38a537ce Update Solaris changes to use OSTYPE and zsh datetime module. 2014-09-16 22:29:52 +05:30
Moinak Ghosh 5e328e3a9c Solaris portability tweaks. 2014-07-11 18:41:49 +05:30
Will Boyce 09fdf76311 ignore usernames beginning with underscore 2014-06-10 13:33:33 +02:00
Mariusz Fik b56e8fb478 Ignore more users in ssh completion.
Signed-off-by: Mariusz Fik <fisiu@opensuse.org>
2014-03-16 18:14:34 +01:00
Daniel Hahler 71d9420637 Use zsh's default for ':completion:*:hosts'
The manual configuration of ':completion:*:hosts' causes some problems
(e.g. issue #1337), and misses useful information (especially from
~/.ssh/known_hosts; issue #690 and issue #1009).

The best option appears to be using zsh's default configuration for
':completion:*:hosts'.

While rebasing this for a new pull request (#1498 got closed by accident
and then requests to re-open it got ignored), it also drops the `users
off` setting: completion of user names can be useful, and the commit
adding it (c4434d2) does not state why.
2014-03-13 17:48:58 +01:00
Sébastien M-B 2595484a97 Merge remote-tracking branch 'upstream/master'
Conflicts:
	lib/aliases.zsh
2013-02-08 19:08:06 +01:00
Alexis Letessier 9af7f86299 Correct variable used for global ssh known host completion 2012-08-01 23:58:09 +02:00
Sébastien 29fb24487c Merge remote-tracking branch 'upstream/master' 2012-06-25 17:41:06 +02:00
s3 1bb715965c Change hardcoded ~/.oh-my-zsh to $ZSH. 2012-06-12 10:18:02 +02:00
Sébastien M-B 741388be00 Merge remote branch 'upstream/master'
Conflicts:
	lib/completion.zsh
2012-04-12 19:28:59 +02:00
Gustavo Barron cb501645d7 Get the Hostname
Main library should use ZSH native hostname function
2011-12-30 12:11:41 -06:00
Kyle Smith d8521693f4 Added support for entries in /etc/ssh/ssh_known_hosts. 2011-12-22 14:02:01 -05:00
Sébastien M-B c4434d2dde Update completion for SSH
Add all hosts found in ~/.ssh/config.
Tip found on: http://www.nerux.org/wiki/OpenSSH#coupler_avec_zsh_completion
2011-11-05 00:34:37 +01:00
Robby Russell 9d67d75b0a Revert "Enable red dots during completion by default".
After a few weeks of using this, I'd prefer this to not be enabled by default. My bad for suggesting that in the first place.

This reverts commit fc49b4a4de.
2011-08-30 20:56:13 -07:00
Loïc Yhuel fc49b4a4de Enable red dots during completion by default 2011-07-28 19:52:53 +02:00
Loïc Yhuel 0848acfb25 Display red dots during completion process (disabled by default) 2011-07-24 21:48:21 +02:00
Pat Regan 655e6e8df0 Merge remote branch 'upstream/master'
Conflicts:
	plugins/github/github.plugin.zsh
2011-04-20 01:29:58 -04:00
Pat Regan 16ac094a43 Moved compinit call back to oh-my-zsh.sh, after plugins are loaded 2011-04-12 09:28:15 -04:00
Robby Russell 8883ace767 Revert "Enable alias completion, do not limit completion to just files"
This reverts commit c3a58b0004.
2011-04-12 10:24:06 +02:00
Pat Regan ef4175981b Moved the single compinit call from oh-my-zsh.sh to lib/completion.zsh 2011-04-08 11:10:14 -04:00
Pat Regan 993e05da50 Replace redundant calls to compinit with a single call. 2011-04-08 10:12:22 -04:00
Woody Gilk c3a58b0004 Enable alias completion, do not limit completion to just files 2011-03-11 21:44:12 -06:00
gwjo 9465ba0de4 Completion fixes
Use /etc/hosts in addtion to $HOME/.ssh/known_hosts as the source for
hostname completion

Turn on completion caching to speed up certain comands

When completing usernames, don't include system accounts by default
2010-11-03 16:57:15 -04:00
Tomas Kramar 74b2c5d75a Do not complete named-directories 2010-09-26 18:29:14 +02:00
Robby Russell 455669e976 Removing legacy completion code 2010-06-03 12:54:40 -07:00
Robby Russell 7a9d4ceb75 Merge remote branch 'jreese/master' 2010-05-07 13:16:50 -07:00
kremso 926d9e8893 Don't autoselect first completion entry (Fixes #14)
The key here is not using MENU_COMPLETE which autoselects the first
entry, but using AUTO_MENU which displays the menu but autoselects
on successive tab hit.

Also, do not use zstyle menu yes because that somehow overrides
the setopts.
2010-05-06 21:06:58 -07:00
John Reese 99d72cad55 Ignore errors from compaudit when using `sudo -s` 2010-04-08 22:35:35 -04:00
Toon Claes 065ae00673 Revert 2009-12-01 23:06:15 +01:00
Toon Claes dca4651cee Completion from history 2009-11-30 23:28:40 +01:00
Robby Russell fc3a3c72b1 Only using the contents of .ssh/known_hosts when the file exists for ssh/scp auto-completion. Closes issue #20 2009-11-08 15:34:02 -08:00
Robby Russell 58bccaf6fc Fixing merge conflicts 886d97f41e 2009-10-26 09:16:19 -07:00
To1ne 6ef2e1f51c Added some comment 2009-10-12 21:17:36 +02:00
Matthew Donoughe c1444a9612 should probably use the value of CASE_INSENSITIVE 2009-10-07 20:08:54 +00:00
Matthew Donoughe cea6040c30 allow case sensitivity to be toggled 2009-10-07 20:03:23 +00:00
James Cox 8a8a7bafa0 merge upstream 2009-09-23 16:14:04 +01:00
Robby Russell 8debd097fb Moving all zsh config options into a lib/ subdirectory to make way for some upcoming changes to directory structure and configuration options 2009-09-23 07:43:36 -07:00