Commit graph

1638 commits

Author SHA1 Message Date
Kurtis Rader
e46978fedb simplify previous change to the _ script
There's no need for a local var or echo in a subcommand. Also, fix the
formatting to match the style guide.
2016-08-07 19:29:14 -07:00
Aaron Gyes
7e0e745958 The last commit introduced a Travis failure.
Only on the OS X travis build.

I can't reproduce it but I figure it's something to do
with test -e vs test -x or the echo -n in command substitution.
Oops.
2016-08-07 15:48:41 -07:00
Aaron Gyes
43515e1298 Use command -v instead of which in _.fish
I didn't know that there was any which usage outside of type -a
in our functions, until I grepped and noticed this.
2016-08-07 15:23:51 -07:00
Jin Liu
ccd62ff44b Bug fix: fish_config/bindings display ESC as "ALT-e"
Fixes #3286
2016-08-04 12:39:32 -07:00
Fabian Homborg
744da2cab2 Add backspace bindings to vi-mode
This was erroneously omitted from the previous commit.

Now backspace in insert mode does backward-delete-char, in default mode
backward-char (i.e. no deleting, just moving). This is consistent with vim.
2016-08-04 20:45:21 +02:00
Fabian Homborg
93b9e7443e Share some bindings between vi- and emacs-mode
This undoes the inheritance since it shared too much.

The idea here is to share bindings that aren't something the editors we're inspired by do - there's no "execute" in vi.
The basic editing and moving bindings are now vi-style in vi-mode and emacs-style in default mode.
2016-08-04 14:03:13 +02:00
Hunsu
b1f576deae Add completions for Arcanist (#3256) 2016-08-03 15:08:22 +02:00
Fabian Homborg
d68320a3c6 Enable 24bit mode less often
In particular, Screen and emacs' "ansi-term" behave like neovim in that
they just ignore the sequences, which leads to the terminal rendering
default color (most of the time white) instead.
2016-08-03 01:13:31 +02:00
[Redacted]
00cb9ce80a Add git shortlog completion (#3274) 2016-08-02 19:34:28 +02:00
Fabian Homborg
afa266a7ea git completions: Fix cases without current branch
Sometimes git just isn't on a branch.
2016-08-02 00:12:31 +02:00
Aaron Gyes
8277f6a1ba Let git normalize line-endings upon commit (LF)
Only one file belonging to fish-shell had DOS/bogus line endings,
with `git add' picking up changes after updating .gitattributes:
hostname.fish.

Unsurprisingly, it has code to support cygwin and was likely
worked on by a user on a Windows machine. This will help
such cases in the future.

Also, in pcre2-10.21/, there was RunTest.bat which was (correctly)
CRLF formatted.  We don't use this batch script at all, so rather
than LF it or add an exception, blast it away like the other pcre2
files omitted from the repo.
2016-08-01 04:38:08 -07:00
Aaron Gyes
b77e2a67f8 Only do fish_greeting if interactive
Even if __fish_config_interactive, it can be shown when a script
uses `read`.

Fixes #3261, #1401.
2016-07-30 22:47:17 -07:00
Aaron Gyes
e75fc8452f Strip out brackets from generated-by-manpage completions.
Handles cases like cupsctl --\[no-\]remote-admin and
unxz --powerpc[ better.

Fixes #3272
2016-07-30 22:01:59 -07:00
Fabian Homborg
0a51b17716 if started without a locale read system config
A common problem for users is that fish doesn't get a locale. This often
happens if systemd is used with getty and fish as login shell.

Fixes #277

Note that I (@krader) made editorial changes before merging this. For
example, running `make style` and otherwise changing long statements to a
series of shorter statements. So if there are any problems it is possible
I introduced them.
2016-07-27 22:15:54 -07:00
Fabian Homborg
49008d7a1c Fix escaping in abbr --erase completions
Fixes #3267
2016-07-26 15:23:02 +02:00
ridiculousfish
46fba342db Revert "Only show greeting on interactive login sessions"
This reverts commit 3d0ea5fe79.
2016-07-24 16:39:44 -07:00
ridiculousfish
5eedb0ee9c Revert "Only show fish greeting for interactive logins"
This reverts commit 3a7a6f16ef.
2016-07-24 16:39:43 -07:00
ridiculousfish
325f047803 Revert "Update __fish_config_interactive.fish"
This reverts commit ec292ec51b.
2016-07-24 16:39:41 -07:00
ridiculousfish
c76f896f69 Revert "Revert "Only show greeting on interactive login sessions""
This reverts commit 88688d02b2.
2016-07-24 16:39:40 -07:00
Aaron Gyes
88688d02b2 Revert "Only show greeting on interactive login sessions"
This reverts commit 3d0ea5fe79.
2016-07-24 03:53:27 -07:00
Aaron Gyes
ec292ec51b Update __fish_config_interactive.fish 2016-07-24 01:42:58 -07:00
Aaron Gyes
3a7a6f16ef Only show fish greeting for interactive logins
This is a regression introduced by 834ebef53c
Bolster with a check for only login sessions too -- hopefully makes it
less annooying on subshells in general.

Fixes #3261
2016-07-24 00:05:05 -07:00
Aaron Gyes
3d0ea5fe79 Only show greeting on interactive login sessions
Fixes #3261
2016-07-23 23:33:20 -07:00
Aaron Gyes
d252704fdb checkout non-empty colorutils.js
The last commit was obviously an error!
2016-07-23 17:18:10 -07:00
Aaron Gyes
dfe363c945 clang-format colorutils.js
.... should make the #3260 diff shorter.
2016-07-23 17:03:32 -07:00
Scott Bonds
99351fcb44 Don't use getent to list hosts if its not supported (#3259)
Fixes #2137 on OpenBSD
2016-07-23 13:24:12 +02:00
Kurtis Rader
b53f42970c correct handling of history args
This fixes several problems with how the builtin `history` command handles
arguments. It now complains and refuses to do anything if the user specifies
incompatible actions (e.g., `--search` and `--clear`). It also fixes a
regression introduced by previous changes with regard to invocations that
don't explicitly specify `--search` or a search term.

Enhances the history man page to clarify the behavior of various options.

This change is already far larger than I like so unit tests will be added
in a separate commit.

Fixes #3224.

Note: This fixes only a couple problems with the interactive `history
--delete` command in the `history` function. The main problem will be
dealt with via issue #31.
2016-07-20 21:18:48 -07:00
Frederik Gladhorn
190fb4a665 git completion: add --stat to show
Of the various options for show, --stat is the one I
regularly use to know the size of a commit.
2016-07-16 20:20:33 -07:00
Frederik Gladhorn
6b99af05a5 Git mergetool completion (#3226)
* git completion: add mergetool

The list of tools is stole from the bash completion file that comes with
git.

* git completion: complete files with merget conflict for mergetool
2016-07-16 00:34:05 +02:00
Frederik Gladhorn
2df263fa26 git completion: Add HEADS
Ranges work with tags and HEAD etc.

Allows to complete "git checkout FETCH_HEAD" and similar.
2016-07-14 22:22:28 +02:00
Frederik Gladhorn
06003f82ae git completion: Rename __fish_git_heads to __fish_git_refs
In git speak, these are refs, while there can be several heads which are
refs in turn.
2016-07-13 11:45:42 +02:00
Aaron Gyes
fb3c839a15 fish_indent did something surprising. 2016-07-11 06:53:20 -07:00
Aaron Gyes
e3187b2361 Actually fix #3221 2016-07-11 06:43:33 -07:00
Aaron Gyes
09291735e6 Use locales preferred date format, fix up options
We don't seem to mention in the documentation that we were forcing
-t for all interactive uses. If we want to do that we should apply
that in the builtin.

history.fish reimplementing every option and doing things kind of
differently is a real pain and it's not clear if the docs are
referring to the or the wrapper script or both.
2016-07-11 01:45:30 -07:00
Aaron Gyes
013506dfd5 Merge pull request #3218 from floam/manparser
Minor manpage completion utility improvements
2016-07-10 10:32:45 -07:00
ridiculousfish
bd2b7764c7 __fish_make_completion_signals to stop spewing on OS X
OS X does not support kill -L or kill -t.
Use the POSIX path to populate __kill_signals
2016-07-09 17:45:16 -07:00
Aaron Gyes
6e0521e23f Completions (mostly): s/.../…/g 2016-07-09 10:57:59 -07:00
Aaron Gyes
d895f876b4 Fix "UNINDENT ..." junk in manpage completions
Problem with Type2ManParser

before:
    complete -c xcode-select -s h -l help --description 'Prints the usage
message. UNINDENT NDENT 0. 0.'
after:
    complete -c xcode-select -s h -l help --description 'Prints the
usage message.'
2016-07-09 07:19:15 -07:00
Aaron Gyes
bb6ce9d142 minor create_manpage_completions.py improvements
Don't truncate long lines with " [See Man Page]" suffix - use the
reclaimed 15 characters for more-useful usage info.

Improve the --verbose output with:
 - spacing fixes
 - diagnostics related to input print repr()/quoted as %r to be less
   confusing.
 - get rid of stupid name() and use type()/__class__.__name__,

- Always use new-style (new as in post python 2.2) classes so this
  behaves the same whether we run in python 2 or 3.

- Properly convert left-quotes and right-quotes to that character in
  deroff.py
2016-07-09 05:51:32 -07:00
Kurtis Rader
14c7cfa84b make kill/pkill completions more robust (#3200)
Someone running fish in an unusual locale reported that an `assert()` was
firing when they typed `pkill c`. I traced it to two bugs. First, the
__fish_make_completion_signals command was producing a weird result. Second,
the builtin `complete` command wasn't adequately verifying its arguments.

Fixes #3129
2016-07-07 18:44:35 -07:00
David Adam
3cd1ef23ab Merge branch 'Integration_2.3.1'
Includes the `string` fallbacks for upgrades from 2.3.1 (as discussed in
issue #3057).
2016-07-03 22:18:55 +08:00
Fabian Homborg
9b4938e2c2 clipboard_paste: Fix lines starting with "-"
Previously, trying to paste "--something" would result in an error from
commandline.
2016-07-03 12:29:58 +02:00
Aaron Gyes
f966248f16 string.fish: use if/else. Reindent. 2016-07-02 11:40:22 -07:00
Aaron Gyes
e597df70d7 Check if fish -c string will work first. 2016-07-02 11:05:04 -07:00
Aaron Gyes
c79e9c7d4e Lossless recompress of images with pngcrush+zopfli
And tweak RTF.
2016-07-01 14:58:56 -07:00
Aaron Gyes
8e7f0e781d Completion for string match --invert
Also adds descriptions for some other options which were absent.
2016-07-01 13:44:14 -07:00
Aaron Gyes
edee3e5eb2 Use fonts found on terminals for the web config.
Instead of just using Courier New across the board, have the
browser try several likely available fonts before defaulting
to the system's "monospace".

Thanks @MarkGriffiths
Fixes #2924
2016-07-01 13:41:06 -07:00
Aaron Gyes
bc693bd4e0 fish_indent type -a's function output and colorize
Doesn't colorize if output is redirected.
This is "fun" and indenting happens to make most of the included
functions display more narrow and fit better into a terminal window.
2016-07-01 06:45:03 -07:00
Aaron Gyes
cd422e5d78 fish_indent type -a's function output and colorize
Doesn't colorize if output is redirected.
This is "fun" and indenting happens to make most of the included
functions display more narrow and fit better into a terminal window.
2016-07-01 06:01:37 -07:00
Aaron Gyes
ca6cda20a3 Fix fish_config in .app
* Export $__fish_bin_dir
* Fix incorrect bundle path in fish.cpp - fish is not in MacOS/ (it should be!)
2016-07-01 04:43:57 -07:00