Commit Graph

2226 Commits

Author SHA1 Message Date
Alan Somers
ed6298ad17 Fix portmaster completions when there are no matches
Don't spew warnings when there are no matches.  Also, use the string
builtin instead of calling sed.

Fixes #3949
2017-04-10 21:37:54 -07:00
Fabian Homborg
ddb9350ea9 Replace use of which with command -sq 2017-04-08 13:21:04 +02:00
Kurtis Rader
75600b6b53 fix setenv and add unit tests
Fixes #3937
2017-04-05 15:31:13 -07:00
SanskritFritz
2105bae1fc Completions for ipset 2017-04-01 01:52:05 +02:00
SanskritFritz
0c265c0f52 Obnam completions updated 2017-04-01 01:52:05 +02:00
SanskritFritz
cd8982b645 Obsolete completions removed 2017-04-01 01:52:05 +02:00
Kurtis Rader
62244f01c2 fix umask handling of symbolic modes
This fixes the handling of symbolic umask values. It also removes two
invocations of `perl` and all but two `math` commands.

Fixes #738
2017-03-28 16:28:24 -07:00
Fabian Homborg
4b9424eb20 type: Minor reformatting
Empty lines after `if` and `if begin`.
2017-03-28 15:55:10 +02:00
Fabian Homborg
c4d69ea8a1 type: Rewrite option parsing
Removes a call to `seq` and makes it a bit more readable.
2017-03-28 15:55:10 +02:00
Fabian Homborg
a3f28e221f type: Remove need for which
This should be completely equivalent without needing an external command.
2017-03-28 15:55:02 +02:00
Fabian Homborg
3d6c4adda9 Fix unescaped ' literals in bracketed-paste
This was a case of a missing \\.

Fixes #3913.
2017-03-26 09:33:11 +02:00
Fabian Homborg
83791a26c3 Stringify mkinitcpio completions
Also fixes an issue with the -k completions.
2017-03-21 01:31:26 +01:00
Fabian Homborg
70354f9f5e Add bind --list-modes option
Fixes #3872.
2017-03-20 16:42:53 +01:00
Kurtis Rader
536b1220fd cleanup __fish_complete_man.fish
I looked at this and noted some problems fixed by this change in
response to exploring if issue #726 was still unresolved.
2017-03-18 21:55:02 -07:00
Fabian Homborg
b6517250c7 vi-mode: \cd should do delete-or-exit
This just removes the special vi binding and hence falls back upon the
shared one.

Fixes #2219.
2017-03-17 12:07:10 +01:00
Fabian Homborg
99e87dded3 Auto-escape pastes inside single-quotes
This is to make pasting literals easier.

When a user pastes something, we normally take it as-is.

The exception is when a single-quote is open, e.g. the current token
is

    foo'bar

When something is pasted here, we escape single-quotes (`'`) and
backslashes (`\\`), so typing a `'` after it will turn it into a
literal token.

Fixes #967.
2017-03-16 16:08:13 +01:00
Kurtis Rader
6123d3cb50 document trap ... EXIT
Fixes #1180
2017-03-14 21:02:02 -07:00
Kurtis Rader
085a9b9267 fix stupid typo introduced by d9b30ab09 2017-03-14 13:17:53 -07:00
Kurtis Rader
d9b30ab090 setenv should behave like export
Fixes #3897
2017-03-14 12:14:22 -07:00
mus0u
b4f70cb98b include exit status indicator in robbyrussell sample prompt 2017-03-13 18:05:49 -07:00
Greynad
98f4e49669 Add string 'repeat' subcommand
This feature add the ability to repeat a string a given number of times.
For example: string repeat -n 3 foo
2017-03-12 20:30:36 -07:00
Fabian Homborg
db63be7909 Add support for bracketed paste
This is a terminal feature where pastes will be "bracketed" in
\e\[200~ and \e\[201~.

It is more of a "security" measure (since particularly copying from a
browser can copy text different from what the user sees, which might
be malicious) than a performance optimization.

Work towards #967.
2017-03-06 00:19:46 +01:00
Dan Zimmerman
f17ddb6770 Fix error when using tmux with vi mode 2017-02-28 19:05:05 +01:00
Clément Martinez
64fe617c63 Add gradle completions 2017-02-22 20:01:13 -08:00
Kurtis Rader
9dd0c47d0b harden alias against foo; bar
If the first word of the alias body ends with a semicolon we need to
strip that character, and otherwise escape the extracted command, to
ensure the subsequent function definition is valid.

Fixes #3860
2017-02-20 20:23:55 -08:00
Kurtis Rader
9f5ce04229 fix perl completions
Fixes #3856
2017-02-18 19:54:36 -08:00
Twinkle
a9617f97b6 enhance git repo for Robbyrussell prompt 2017-02-18 17:11:38 -08:00
Fabian Homborg
0a8c922d92 Use command -sq instead of redirection
This option has been available for a while now and it's a bit shorter.
2017-02-18 22:16:55 +01:00
David Adam
40de253b3a Upgrade git:// and http:// URLs to https://
Work on fish-shell/fish-site#47

[ci skip]
2017-02-17 21:31:44 +08:00
maxried
06b2775131 Improved adb completion
* Added reconnect and its subcommand
* Updated the sideload description and made its completion more advanced
* Silenced errors on backup and uninstall auto completion when no device is attached
2017-02-15 11:53:28 -08:00
Terje Larsen
22a2098c34 Add completions for helm (#3829)
* Add completions for helm

helm - is a tool for managing Kubernetes charts. Charts are packages of
pre-configured Kubernetes resources.

See: https://github.com/kubernetes/helm

* Improve helm release completions description

After some feedback from the community it seems it is good to include
the chart in the release description. This adds the chart information to
the description. So to say this is `Release of CHART`.

* Further improvements to helm completions

- Utilize complete -f, -r and -x properly
- Add some more context aware completions (chart versions, kubectl context and namespaces)
2017-02-13 17:23:29 +01:00
Alan Somers
ad6ea1691e Fix "mount -t" completions on non-Linux OSes
AFAICT Linux alone uses the "mount.XXX" convention for mount helpers.
Illumos, Irix, HPUX, OSX, and the BSDs all use "mount_XXX".

Fixes issue #3841
2017-02-12 18:05:37 -08:00
Kurtis Rader
813415302a fix clear screen invocation
It's necessary to use a subcommand to eat the newline that `string
replace` appends to the string.
2017-02-12 14:12:12 -08:00
Clément Martinez
cbea0b9378 mount & udisksctl: improve -o completions` (#3764)
* mount & udisksctl: improve `-o` completions`

* Update __fish_complete_mount_opts
2017-02-12 15:23:41 +01:00
Markus Reiter
f38646593c Allow export to set colon-separated PATH, CDPATH and MANPATH. 2017-02-12 15:20:07 +01:00
Fabian Homborg
9598218a94 Don't call fish in the background to generate completions
Fixes #3803 even harder.
2017-02-12 14:56:36 +01:00
Fabian Homborg
afdd1a98c1 Don't clear scrollback with the \cl binding
ncurses since 6.0 sends the "E3" sequence along with "clear", even for
just `clear` or `tput clear`. This deletes the scrollback buffer which
is usually not what you want.

Fixes #2855.
2017-02-12 12:01:28 +01:00
Fabian Homborg
52648acdc8 Check python version at runtime for completions
Some things like pyenv can change what `python` refers to, so what we
detect when we load the completions can become invalid later.

Also mentioned in #3840.
2017-02-11 16:07:06 +01:00
Fabian Homborg
f9664f224d Don't wrap pythonX completions
The issue here was that the `python` completion did a version check on
the `python` binary, so it would complete python2 stuff if system
python was py2, even if the user tried to complete `python3`.

This isn't beautiful, but it's more resilient than e.g. doing magic
with `commandline`.

Fixes #3840.
2017-02-11 16:07:06 +01:00
Markus Reiter
3e35e6e488 Use string split in alias. 2017-02-10 14:09:41 +01:00
Fabian Homborg
214c677032 Remove outdated completions
These are dead projects with completions that didn't provide much
value.

Fixes #3662.
2017-02-09 18:42:55 +01:00
Cristian Prieto
2bbecf4292 Yarn completion (#3816)
* Add main yarn commands and subcommands

* Add more short/long options

* Add subcommands for most main commands

* Add suboptions for mutext and access
2017-02-09 17:24:38 +01:00
Jeff Dickey
cf63d1b2a7 added mocha.fish 2017-02-08 14:22:30 -08:00
Kurtis Rader
0970cc8736 time for another make style-all 2017-02-07 21:52:35 -08:00
René Schwaiger
908ed493cc Fix wildcard bug in __fish_print_filesystems
Before this change the function `__fish_print_filesystems` would print
an error message about an empty wildcard match for the pattern
`$PATH/mount.*`, if the current operating system does not include any
helper binaries for the command `mount`. An example for such an OS is
the current version of macOS (version 10.12).
2017-02-06 08:08:54 -08:00
Rabah Meradi
a5e8b81ee3 Add completion for climate 2017-02-05 19:22:35 -08:00
ridiculousfish
8a09c99f36 Escape in vi mode to end paging, but stay in insert mode
Change the escape key binding in insert mode (in vi key bindings)
to check if we are in paging mode. If so, emit cancel and stay in
insert mode. Otherwise perform the current behavior of switching
back to default mode and adjusting the cursor.

Fixes #2871
2017-02-05 02:49:52 -08:00
Fabian Homborg
b3d5fb71f4 completion generator: Protect against undefined variable
Proc wasn't defined if $MANPATH was used.

Fixes #3808.
2017-02-03 18:32:14 +01:00
Fabian Homborg
94b71353ef completion generator: Define parent_paths directly if MANPATH is set 2017-02-03 18:32:14 +01:00
David Adam
49e98cde4c Merge branch 'Integration_2.5.0' 2017-02-03 21:14:40 +08:00
Clément Martinez
47ad707bba Add jq completions 2017-02-02 23:07:54 +01:00
Terje Larsen
bf84879134 Add completions for minikube (#3778)
* Add completions for minikube

This adds basic completions for minikube, the subcommands and their options.

* Improve minikube completions

- Use more consistent and shorter descriptions.
- Fix subcommand options
- Add more semantic completions

* Fix named variable for option value

* Add completions for minikube addons enable/disable

* Add completions for minikube addons open
2017-02-02 17:45:42 +01:00
Fabian Homborg
b7cdb6d586 Merge pull request #3757 from nim65s/master
systemctl completions: add cat & edit commands

Also use systemd version to determine the commands it knows.
2017-02-02 17:44:07 +01:00
Kurtis Rader
088b10f4c2 style fixes to previous commit
This commit addresses many of the style problems with the previous
commit. If this introduces any bugs they are solely my fault. The style
of this code needs more improvement. Some of which could be done today.
Others will have to wait until `fish_indent` is improved.
2017-02-01 22:49:40 -08:00
Dale Eidd
eff6b98813 numerous improvements to ssh/scp completions
Add IPV6 /etc/hosts completion support. Parses columns rather than values which produces improved output.

Support ssh -F and Include completion

Ignore ssh Hostname and Host with wildcard. The following only get in the way:

- Hostname: Host resolves to Hostname
- Wildcard Host: Cannot ssh to a glob pattern

Improve scp completions

* complete only local files when no host provided
* complete only remote files when host is provided
* complete local files or hosts when no separator

Disable username completion for ssh/scp

Username completion only provides local users which will unlikely be
useful on a remote machine. ssh will use the current username (the only
useful one) or one provided in the ssh config.
2017-02-01 22:12:49 -08:00
Clément Martinez
2b13472419 Improve htop completion
Add new options
Add description at the top of the file
Fix `--sort-key` completions
2017-01-31 15:52:55 -08:00
Clément Martinez
9d5471722f Improve help completions 2017-01-31 15:52:55 -08:00
Clément Martinez
0447ee7b96 Improve go completions 2017-01-31 15:52:55 -08:00
Clément Martinez
cd58e6129c Improve grep completions 2017-01-31 15:52:55 -08:00
Clément Martinez
0df65a106d Add setsid completions 2017-01-29 20:06:32 -08:00
Fabian Homborg
03e0f1eb21 create_manpage_completions: Try more ways to get manpath
Haiku only has `man --path`.

Still doesn't support OpenBSD.

Use $MANPATH if available. This needs to:

- Ignore stderr (we pipe it and throw it away)

- Read the subprocess returncode, since `man --path` is an existing
  command that fails instead of a non-existent one (that raises an
  exception)

- Properly set up the fallback

Fixes #2194.
2017-01-29 18:00:48 -08:00
Kurtis Rader
06282f02fd don't run fish_update_completions in unit tests
Running `fish_update_completions` in unit tests is not needed and
hideously expensive. To the point it can cause flakey test behavior.
2017-01-29 18:00:48 -08:00
Clément Martinez
61f272495d Add i3-msg completions 2017-01-28 19:48:57 +01:00
Cristian Prieto
7edfcd5c63 Add more options for git log
This closes #3743
2017-01-27 14:13:25 +01:00
Kurtis Rader
5b6cc5af6d time for another make style-all
Gotta keep the entropy (i.e., disorder) from increasing.
2017-01-26 20:05:46 -08:00
Fabian Homborg
98b561929f Add flatpak completions
A bit barebones, but better than nothing.
2017-01-26 22:04:27 +01:00
Fabian Homborg
f513f4e53a Add completions for xinput 2017-01-26 22:04:27 +01:00
Fabian Homborg
67a661c19f Fix dconf completions
This would always just suggest the commands.
2017-01-26 22:04:27 +01:00
Fabian Homborg
7d44f8e871 Add usermod completions
Fixes #3775.
2017-01-26 21:40:05 +01:00
Guilhem Saurel
e07928062f addressing comments 2017-01-26 00:01:34 +01:00
Clément Martinez
ec19159580 man completions: complete fish commands (#3762)
* man completions: complete fish commands

`apropos` does not output fish commands so they were not completed.

* Improve __fish_complete_man
2017-01-25 15:34:59 +01:00
Cristian Prieto
b7d60dc7bb Improve bzr completion (#3769)
* Improve bzr completion. Closes #3661

 * Add basic completion for bzr commands
 * Include short and log options for common commands
 * Removed not so common commands

* Remove trailing '.' as requested by #3769

* Remove '=' as suggested by #3769

 * We don't need '=' in long options

* Use fish helper functions for autocomplete

To avoid issues pointed out in #3769 helper functions included in fish
are used (__fish_use_subcommand and __fish_seen_subcommand).

* Fixed typo
2017-01-25 15:34:00 +01:00
Guilhem Saurel
fab4399b8c available completions for systemctl depends on its current version 2017-01-25 01:14:38 +01:00
Clément Martinez
3e10640c04 Add pv completions 2017-01-24 23:52:46 +01:00
Judicaël Grasset
730086b0f0 apt: Add completion for the autoremove subcommand (#3771) 2017-01-24 19:55:42 +01:00
Kurtis Rader
c9a409dcf3 deal with multiline commands which have flags
Fixes #3758

(cherry picked from commit 176a291ed2)
2017-01-23 09:11:06 +08:00
Kurtis Rader
176a291ed2 deal with multiline commands which have flags
Fixes #3758
2017-01-21 20:23:06 -08:00
Guilhem Saurel
1350b44ecf systemctl completions: add cat & edit commands 2017-01-22 03:22:29 +01:00
Clément Martinez
082d4b5a7e Add light completions 2017-01-21 00:33:58 +01:00
Fabian Homborg
c111a65622 Stack completions: Fix dead link
This was just reshuffled a bit. Now it uses the main page (which then
redirects to the docs anyway), which should be a bit more stable.
2017-01-20 21:46:59 +01:00
Fabian Homborg
e89c66a224 git completions: git push uses set-upstream
This was a misunderstanding in 96a28df. git _branch_ now uses
set-upstream-to, while git _pull_ still only has set-upstream.

Thanks @moverest.
2017-01-20 15:55:39 +01:00
Clément Martinez
85212c57e8 Add castnow completions 2017-01-19 21:59:59 -08:00
Fabian Homborg
5996962749 Use normal fish_title in Terminal.app
This needs to be done only for new enough Terminal.app versions, which
we don't have enough time to figure out for 2.5.0.

Fixes #3629.
2017-01-19 14:38:11 +01:00
Mehul Tikekar
59eb75021b Remove cd in __fish_print_interfaces 2017-01-18 15:44:28 -08:00
mathbunnyru
7a80610300 Delete trailing spaces 2017-01-15 14:57:21 -08:00
Kurtis Rader
8d32eb62ae reinstate some bindings for vi mode
Fixes #3731
2017-01-15 13:55:43 -08:00
Kurtis Rader
d37e7bcc25 reinstate some bindings for vi mode
Fixes #3731
2017-01-15 11:11:38 -08:00
Cristian Prieto
6f9f7632f3 Added default mode prompt function (#3727)
* Added new function for the default prompt mode

Now fish mode prompt will call fish_default_mode_prompt, this will solve #3641

* Added function description

* Change wording for documentation about default mode prompt

* Finish changes requested in code review
2017-01-12 16:07:41 +01:00
Michael Alexander
dcf3d03e54 Implemented Dracula colors 2017-01-11 22:35:15 +08:00
David Adam
41a41b1591 set_color: add completions for italics, dim and reverse 2017-01-11 22:00:33 +08:00
Clément Martinez
4bed9ea56d Add xz support to __fish_complete_tar function 2017-01-10 16:09:49 +01:00
Clément Martinez
c28bd74ca7 Add --xz, -J completion options to tar command 2017-01-10 16:09:49 +01:00
Kurtis Rader
4223b3da68 deal with BC_LINE_LENGTH not being honored
FreeBSD 12, Dragonfly BSD, and presumably other BSDs don't recognize the
BC_LINE_LENGTH env var and might split the output at 70 chars.

Fixes #3414
2017-01-09 17:32:11 +08:00
Fabian Homborg
5ca63c4956 dirs: Stringify
Two useless forks plus one per element in $dirstack.
2017-01-06 16:13:01 +01:00
Fabian Homborg
a070dffc4e Merge pull request #3666 from drwilly/master
mixed bag of shell scripting improvements
2017-01-06 16:10:03 +01:00
Fabian Homborg
1f836f72b3 pushd: Use $PWD instead of command pwd
Useless forks.
2017-01-05 01:49:44 +01:00
dareg
89e48ba0b3 Add completion for the changelog subcommand 2017-01-03 20:59:18 -08:00
Oliver Gondža
dddbdddcff Avoid using empty description for complete in maven completion 2017-01-03 16:57:12 +01:00
Aaron Gyes
1fb92b6f8c Use new set_color features for __fish_cancel_commandline
We still apparently need to rely on tput for 'el'.
2016-12-31 06:12:05 -08:00
Fabian Homborg
3da3558e35 Remove eval in __fish_complete_proc
This was completely useless.
2016-12-29 15:35:19 +01:00
Fabian Homborg
b29b026106 math: Set BC_LINE_LENGTH to a very high number
This means we no longer have to do manual stitching which improves performance.
2016-12-29 15:13:48 +01:00
Fabian Homborg
11f4e64e45 Revert "Use BC_LINE_LENGTH=2 for bc."
This would fail on very long numbers, e.g.

`math "1 + 1233242342353453463458972349873489273984873289472914712894791824712941"`

would now return "42", where it previously returned the correct "1233242342353453463458972349873489273984873289472914712894791824712942".

This reverts commit 26e781ef5a.
2016-12-29 13:53:11 +01:00
Fabian Homborg
bd93a9e6ff Remove useless-use-of-echo in git_prompt 2016-12-29 13:49:21 +01:00
Aaron Gyes
aed5267fd1 Stringify __fish_git_prompt 2016-12-29 04:11:23 -08:00
Aaron Gyes
26e781ef5a Use BC_LINE_LENGTH=2 for bc.
It's not the case that macOS and old BC doesn't respect this environment
variable, just that they don't have special behavior when it's set to 0.
However, there is rather universal favorable behavior with a value of 2.

Output is of the form:
\
999999999999999999999999999999999...

with the second line being arbitrarily long. So just grab that line
instead of stitching with `string`.

This can yield a 25-30% speedup.
2016-12-29 03:47:37 -08:00
Samantha Marshall
4cd34816cf Adding subcommand completions for launchctl 2016-12-28 18:39:25 +01:00
Radomír Bosák
f9835b5077 Add support for subcommands in __fish_man_page
This commit adds a feature that after typing "git add" and pressing
"alt+h", the manpage for "git-add" instead of "git" would be displayed.

The new logic takes the first argument which doesn't start with a dash
and tries to display manpage for "command-argument"; it falls back to
"man command" it the first try doesn't succeed.

Fixes #3618.
2016-12-27 16:03:21 -08:00
Sam H
6b536922af Append paths from /etc/manpaths and /etc/manpaths.d/* to MANPATH, for #1092.
* Only append paths if `MANPATH` is already set, to match behavior of macOS
     `path_helper` utility.
   * Use the same technique as is used above to set PATH from /etc/paths and
     /etc/paths.d/*.
2016-12-27 14:21:36 -08:00
Terje Larsen
2740cc80d2 improve make target completion
- Support completing dynamic make targets.
- Support completing make targets when using -C/--directory.
- Support `-Cdir/path`, `-C dir/path`
- Support `--directory=dir/path`, `--directory dir/path`

This detects if the make command have the `-p` switch otherwise it
assumes it is BSD make and will run a different command to try to figure
out the available targets.
2016-12-21 19:04:15 -08:00
Kurtis Rader
1f2432d63a reinstate VBox* completions
Commits 48aa92900 and 77d4d21ca each added two files with the same name
differing only in letter case. That causes problems on systems like
macOS and MS Windows. Remove the lowercase file names. Anyone needing
those completions can do (same for VBoxHeadless):

function vboxsdl --wraps VBoxSDL
    VBoxSDL $argv
end
2016-12-21 16:03:32 -08:00
ridiculousfish
a70ed0282b Revert "Add VBoxSDL completions"
This commit confused git on case-insensitive HFS+

This reverts commit 48aa929008.
2016-12-21 15:53:51 -08:00
ridiculousfish
a7e3678d3e Revert "Add VBoxHeadless completions"
This commit confused git on case-insensitive HFS+

This reverts commit 77d4d21caa.
2016-12-21 15:53:38 -08:00
Wilke Schwiedop
fa7682ec3c posixify! 2016-12-21 18:47:04 +01:00
Wilke Schwiedop
28cde83c33 requested changes 2016-12-21 18:44:34 +01:00
Clément Martinez
96157a05f6 Update fish_indent completions 2016-12-21 14:51:48 +01:00
Clément Martinez
b9f0842d7e Add base64 completions 2016-12-21 14:51:48 +01:00
Clément Martinez
77d4d21caa Add VBoxHeadless completions 2016-12-21 14:51:48 +01:00
Clément Martinez
48aa929008 Add VBoxSDL completions 2016-12-21 14:51:48 +01:00
Clément Martinez
291a28e79c Add __fish_print_VBox_vms function
Improve __fish_print_VBox_vms
2016-12-21 14:51:48 +01:00
Clément Martinez
6ab97227de Add objdump completions 2016-12-21 14:51:48 +01:00
Clément Martinez
6dec6ddc26 Fix netctl-auto completions 2016-12-21 14:51:48 +01:00
Clément Martinez
0785260365 Fix pygmentize completion
The previous implementation didn't take into account that a lexer could
have multiple names and gave `cpp, c++` instead of `cpp` and `c++` when
completing `pygmentize -l c`.
2016-12-21 14:51:42 +01:00
Clément Martinez
885de80a0e Add feh completions 2016-12-21 14:45:02 +01:00
Wilke Schwiedop
8204d3103b fix gpg completion 2016-12-21 13:46:43 +01:00
Wilke Schwiedop
0814797444 misc improvements to scripts 2016-12-21 13:46:43 +01:00
Wilke Schwiedop
e8bed9e038 replace "sort | uniq" with "sort -u" in scripts 2016-12-21 13:46:43 +01:00
Wilke Schwiedop
a927efa015 remove "cat file |" from scripts 2016-12-21 13:46:43 +01:00
Fabian Homborg
05ab849b72 Remove more complete "-u" and "-A" switches
Some of these were missed in #3660.
2016-12-21 13:07:27 +01:00
Radomír Bosák
720c0ddb35 Remove -u and --unautoritative from completions
--authoritative and --unauthoritative 'complete' builtin switches have no effect anymore.
This commit removes usage of --unautoritative/-u in completions.
2016-12-20 17:16:22 -08:00
Radomír Bosák
2900352e04 Remove -A and --autoritative from completions
--authoritative and --unauthoritative 'complete' builtin switches have no effect anymore.
This commit removes usage of --autoritative/-A in completions.
2016-12-20 17:16:22 -08:00
Fabian Homborg
e8c18386c8 Bind \x7f to backward-{delete,}-char in vi-mode again
Partially reverts 745bceb9d8.

This is now again in line with the default bindings.
2016-12-18 21:25:56 +01:00
Kurtis Rader
745bceb9d8 fix backspace/del vi mode bindings
The recent refactoring to separate default (emacs) from vi key bindings
overlooked adding `\cH` bindings to vi mode. This also fixes the
behavior of the [del] key bindings (\x7F).

Fixes #3653
2016-12-16 21:52:58 -08:00
Tim Smith
1a1a9b9927 Prevent error in acidhub prompt by quoting the regex
string errors if this regex isn't quoted. This results in this error:

http://stackoverflow.com/questions/40942185/fish-shell-init-git-repo-yields-constant-terminal-output-after-every-command

Signed-off-by: Tim Smith <tsmith@chef.io>
2016-12-16 10:43:40 -08:00
Piotr Matląg
d885f00941 Update nmcli completions 2016-12-14 17:06:10 +01:00
Pierre Neidhardt
5a5b51c909 Fix fusermount completion 2016-12-13 12:54:13 +01:00
Radomír Bosák
896b9ecc70 Add descriptions for dconf subcommands
Suggestions for the dconf command were missing descriptions (it was
marked as TODO). This commit adds them.
2016-12-12 11:56:29 +01:00
Fabian Homborg
4c7baa37a3 Add dconf completions
A configuration tool common with gnome stuff.

Fixes #3638.
2016-12-11 21:12:37 +01:00
Fabian Homborg
90f7d4b081 clipboard_paste: Require non-empty clipboard contents
Fixes #3637.
2016-12-10 21:30:57 +01:00
Fabian Homborg
029d88e962 vi_cursor: Refactor detection logic
Makes it a bit easier to read.

Now we can begin reworking it (again) to make iTerm work.
2016-12-09 19:32:18 +01:00
Kurtis Rader
59fa04bd91 function for editing command line in ext editor
This implements a standard function and bindings for editing the command
line in an external editor. This feature has been requested multiple
times in the past year with various solutions cut and pasted into those
issues. This change combines the best aspects of those solutions.

Fixes #1215
2016-12-08 19:17:09 -08:00
Kurtis Rader
b48b2ddfb2 fix extraction of LS_COLORS
Strip surrounding quotes if present.

Fixes #3630
2016-12-07 14:22:42 -08:00
Kurtis Rader
e79d42aa52 fix handling dircolors output on Cygwin
Fixes #3563
2016-12-04 18:47:39 -08:00
Kurtis Rader
7bb3bf7c74 fix regression from commit 20bcbcc2
There were two places in the code that used the anti-pattern of
returning True on success else an error message. In python you should
always be able to replace `if x == True:` with just `if x:`. Which is
what the lint tool recommended. Unfortunately I didn't notice how the
return value was being used. This fixes that by changing the two
affected functions to return an error message or None on success.

This also adds `from __future__ import print_function` since the code
uses the `print(msg)` function form rather than the `print msg`
statement form. The former works by accident on python2 because the
parens are interpreted as creating parenthesized expression that
devolves to the single string inside the parens. So while the future
import isn't strictly speaking necessary it will help avoid mistakes in
the future if more complex `print()` calls are added.

Partial fix for #3620
2016-12-04 16:01:32 -08:00
David Adam
41acaced3f webconfig: separate arguments to abbr
`abbr` used to take a single argument and split in on the first space,
but 309e10e7 and predecessors altered this behaviour. Update the web
config use of abbr to the newer format.

Fixes #3620.
2016-12-04 21:32:49 +08:00
Kurtis Rader
42eaacd3a1 enable make style-all doing fish scripts
I had disabled having `make style-all` restyling fish scripts because a
majority of them did not conform to the style enforced by `fish_indent`.
I recently restyled most of the fish scripts with the exception of the
completion scripts. So this re-enables restyling all scripts with the
exception of completion scripts.
2016-12-03 20:39:32 -08:00
Maciej Ostaszewski
4288db9d39 correct option for bc completion 2016-12-04 00:22:31 +01:00
Kurtis Rader
d73ff39393 fish vi mode cursor shape on iTerm2
Fixes #3593
2016-12-02 19:49:15 -08:00
Fabian Homborg
422ff0f173 Don't paste if xsel fails
This silences a rather verbose error.
2016-12-02 01:29:58 +01:00
Radomír Bosák
1fbcb1ee9d Add the possibility to rename abbreviations
The abbr function doesn't have the possiblity to rename abbreviations.
You have to delete the old one and create a new one. This commit adds
this functionality and uses the syntax:

abbr -r OLD_KEY NEW_KEY

Fixes #2155.
2016-12-01 14:42:20 -08:00
Kurtis Rader
1ca1667786 fix bug introduced by fish_indent
Commit 11a60c8 restyled all the fish scripts using fish_indent. Sadly a
bug in fish_indent did not correctly reformat an unusual structure.
2016-11-28 17:13:01 -08:00
Kurtis Rader
c8d2e6d972 two more tests of VTE_VERSION that need protection 2016-11-28 14:39:41 -08:00
David B. Lamkins
ca33bbd4e0 Eliminate spurious startup message when $VTE_VERSION is unset. 2016-11-28 14:36:20 -08:00
Kurtis Rader
11a60c8374 reformat all fish scripts
I hate doing this but I am tired of touching a fish script as part of
some change and having `make style` radically change it. Which makes
editing fish scripts more painful than it needs to be. It is time to do
a wholesale reformatting of these scripts to conform to the documented
style as implemented by the `fish_indent` program.
2016-11-27 21:27:22 -08:00
Kurtis Rader
54a76bb9e5 emit error message when test is given invalid int
This augments the previous change for issue #3346 by adding an error
message when an invalid integer is seen. This change is likely to be
controversial so I'm not going to squash it into the previous change.
2016-11-27 20:37:30 -08:00
Fabian Homborg
9ad1b86e4e Reset bindings if the new value was bogus.
See #3590.
2016-11-27 14:17:24 +01:00
Aaron Gyes
f63c8a703e 'test' completions: comment out entries
Our builtin doesn't do some of this stuff. See #3589
2016-11-27 03:05:11 -08:00
Aaron Gyes
4f6ac06b21 Don't automatically generate completions without python
This is doomed to cause a messy error on every launch on any systems
that are using fish without python installed. Fixes #3588
2016-11-27 02:00:21 -08:00
Aaron Gyes
18cc06b38f Don't no-op terminal.app title if it's customized
We only want to override the internal fish hardcoded title.
Fixes #3578
2016-11-26 20:02:51 -08:00
Patrick Häcker
ded6e726e5 Output current default priority in dpkg-reconfigure completion
This might be a bit over the top, but getting the information that a default priority threshold is used without knowing what that value is or how to find out might not be so useful after all. Thus, change the completion to include this information dynamically.
2016-11-26 22:53:54 +01:00
David B. Lamkins
5ec9fcd8d4 Allow browser for help to be chosen indenpendent of $BROWSER. 2016-11-25 18:35:22 -08:00
Harm Aarts
5cfd3eb63a Update LXD completions. 2016-11-23 23:48:01 +01:00
maxried
2e5693a6bc Fix erroneous \t in sysctl completion (#3562)
The last commit to this auto completion changed it to use `string replace` instead of `tr`. Unfortunately they do not behave the same. `tr " = " "\t"` replaces " = " with a tabulator character, while `string replace -a " = " "\t"` replaces it with \t. Either `string` is misbehaving or this auto completion was broken.
2016-11-18 11:10:09 -08:00
Fabian Homborg
acc2353328 vi_cursor: For TERM = xterm require another condition
We cannot just use TERM = xterm and defined Ss sequence, as some old
vte-based terminals are still in the wild that don't support the
sequence and don't have $VTE_VERSION set.

I have tested this on

- konsole - supported and works ($KONSOLE_PROFILE_NAME)
- new xterm - supported and works ($XTERM_VERSION)
- lxterminal-gtk3 - supported and works ($VTE_VERSION)
- new gnome-terminal - supported and works ($VTE_VERSION)
- lxterminal-gtk2 - not supported and deactivated (no $VTE_VERSION)
- tmux in konsole - works
- tmux in lxterminal-gtk2 - deactivated

and for all supported ones with the respective variable erased, to see
that it is deactivated.

Fixes #3499.
2016-11-18 19:24:29 +01:00
Olivier Perret
8423345e09 Add completions for mkvextract (#3492)
* add completions for mkvextract

* fix edge cases with option placement in mkvextract.fish

* improve resiliency to errors in mkvextract.fish

* minor fixes in mkvextract.fish
2016-11-18 14:39:20 +01:00
Harm Aarts
36d4283d17 Add LXC/LXD completions.
At the moment this covers only the most basic use cases.
Texts are taken from `lxc help` command.
2016-11-18 12:27:29 +01:00
Kurtis Rader
e8a31a13a1 make it easy to get the legacy hybrid key bindings
The changes related to issue #3068 removed most of the emacs bindings
from vi mode. However, since fish 2.4.0 was released several people have
pointed out that the directions for reinstating the legacy hybrid key
bindings don't work. This change fixes that and makes it easier to use
the legacy hybrid bindings.

Fixes #3556
2016-11-16 22:45:00 -08:00
Fabian Homborg
3e82be4ac2 vi_cursor: Set required VTE version to 4000
It seems the changelog entry for 1910 was misleading.

Fixes #3499.
2016-11-16 22:43:33 +01:00
Kurtis Rader
708f80d855 handle unexpected args to binding mode functions
Fixes #3472
2016-11-15 18:44:20 -08:00
Kurtis Rader
043725cdd5 fix the style of fish_default_key_bindings.fish 2016-11-13 13:39:55 -08:00
Kurtis Rader
209a2576cd fix using external realpath command
Fixes #3489
2016-11-13 13:34:19 -08:00
Aaron Gyes
bd03c3fbc5 vared.fish don't use undocumented 'reset' color
... there is no practical difference in behavior using this here
and it is not documented.
2016-11-11 14:08:28 -08:00
Kurtis Rader
20bcbcc252 fix webconfig.py lint issues 2016-11-10 16:23:08 -08:00
Kurtis Rader
47a9f99523 more robust fish_config IPv6 detection
Fixes #3530
2016-11-10 15:43:59 -08:00
Kurtis Rader
9e922a6e02 make status saner vis-a-vis arg parsing
The `status` command currently silently allows incompatible flags (i.e.,
subcommands). Too, using flags to specify subcommands misleads the user
into thinking they can specify multiple subcommands.

We recently modified the `history` command to deprecate using flags for
subcommands. This change does the same for the `status` command.

Fixes #3509
2016-11-07 12:11:08 -08:00
Colin Marquardt
a275618589 Typofix: shoe -> show 2016-11-07 09:46:07 -08:00
Fabian Weisshaar
7a1146ebb5 add caffeinate completion, see #3525 2016-11-06 05:43:45 -08:00
Fabian Weisshaar
180c211dd2 add mdimport completion 2016-11-06 05:43:45 -08:00
Fabian Weisshaar
848495d4cf add mddiagnose completion 2016-11-06 05:43:45 -08:00
Fabian Weisshaar
87c51f2c10 add tmutil completion 2016-11-06 05:43:45 -08:00
Fabian Weisshaar
b41fced062 add mdfind completion 2016-11-06 05:43:45 -08:00
Fabian Weisshaar
71e835feec add mdls completion 2016-11-06 05:43:45 -08:00
Fabian Weisshaar
313cb0d248 add mdutil completion 2016-11-06 05:43:45 -08:00
Fabian Weisshaar
0c4ede5627 add nvram completion 2016-11-06 05:43:45 -08:00
Aaron Gyes
87bfd1a01e Revert "Add a fish_key_reader wrapper"
This reverts commit c02f5ceb0f.
2016-11-04 19:08:48 -07:00
Aaron Gyes
95385eda80 Create a fish_key_reader wrapper ala fish_indent
Needed for fish_key_reader to work in a .app bundle without
fish previously installed.

I just copied fish_indent.fish and s/indent/key_reader
2016-11-04 19:07:37 -07:00
Aaron Gyes
c02f5ceb0f Add a fish_key_reader wrapper
This will be necessary for fkk to work when one is using the .app
bundle and has not installed fish otherwise.

I just copied fish_indent.fish.
2016-11-04 19:05:10 -07:00
Manzur Mukhitdinov
00a8766635 auto-complete for sysbench (0.4.12)
SysBench is a modular, cross-platform and multi-threaded benchmark tool for
evaluating OS parameters that are important for a system running a database
under intensive load
2016-11-04 22:22:12 +01:00
Fabian Weisshaar
097d2246c2 add dig completion 2016-11-04 22:19:55 +01:00
Patrick Häcker
72e687296b Create autocompletion for dpkg-reconfigure
The dpkg-reconfigure command is used on Debian and Ubuntu based systems to reconfigure packages.

According to the relevant manpage's the commited completion file should be complete.
2016-11-03 13:14:28 +01:00
Fabian Homborg
b9b66791c1 fish_vi_cursor: Ignore errors from tput
Fixes #3519.
2016-11-03 08:34:55 +01:00
Kurtis Rader
c10952c354 lint: fish_indent all sample prompts 2016-11-01 19:19:45 -07:00
Aaron Gyes
19e12e3747 Revert mistaken file inclusion.
I was testing command descriptions and mistakenly left in a bogus file.
2016-10-31 23:46:40 -07:00
Aaron Gyes
edcf15e3d7 Sorin prompt: updates
Use $USER, prompt_hostname, string
Update to use correct color names such as magenta over purple.
Use bright color variants instead of bold in some cases.
2016-10-31 23:41:04 -07:00
Aaron Gyes
9f05697dcc sorin right prompt: reset color at end
bold mode being left enabled was causing issues in the pager.
2016-10-31 23:40:29 -07:00
Fabian Homborg
2a5ad198bf Rework cursor detection
Fixes #3499.
2016-10-31 21:51:06 +08:00
Aaron Gyes
960cc628b2 Don't choke defining aliases with quotes
Fixes #3510
2016-10-31 01:37:23 -07:00
Aaron Gyes
c4bd110fca List alias-created functions on alias sans args
The previous change I made here makes this not hard to do, but
kind of lame in implementation.
2016-10-28 22:31:58 -07:00
Aaron Gyes
2d46969d3e alias: identify as alias in description.
Like so:

~ $ alias foo=bar
~ $ functions foo
function foo --description 'alias foo=bar'
	bar  $argv;
end
2016-10-28 14:44:55 -07:00
Fabian Homborg
7ea2dc4488 Disable vi-cursor on xterm < 282
Fixes #3499.

@zanchey: This is for integration-2.4.0.
2016-10-27 10:16:57 +02:00
Fabian Homborg
56679d4776 Don't use open function if a command exists
Turns out this is also the case on Haiku.

It also eliminates a fork.

Closes #3487.
2016-10-26 15:48:42 +02:00
Kurtis Rader
37d91d0c29 change name of the function 2016-10-23 15:02:14 -07:00
Kurtis Rader
8dfee7ff76 add new file to change 2016-10-23 14:56:18 -07:00
Kurtis Rader
07de13f61f implement a fish_prompt_hostname function
Standardize how the host name is included in the prompts that do so.

Fixes #3480
2016-10-23 14:20:54 -07:00
Aaron Gyes
668de88e69 Supress fish_title only for Terminal.app
VTE terminals apparently do not use the OSC sequence to compose
title components.
2016-10-23 12:02:01 -07:00
Aaron Gyes
cbe2d4b5f1 defaults completions: shorten and improve brevity
At 80 columns the description obscured 'find' in 'default find'.

Improve others.
2016-10-22 12:37:00 -07:00
Fabian Weisshaar
7878dbc4f0 add defaults (macOS) completion 2016-10-22 20:13:18 +02:00
Fabian Weisshaar
e16f6ca2aa add listFilesystems to diskutil completion 2016-10-22 20:13:18 +02:00
Aaron Gyes
c7e26e494e Fix Terminal.app title
Defining fish_title here is too late because there will already be a
title set. Work around issue by clearing it at same time.
2016-10-22 10:47:46 -07:00
Kurtis Rader
345950ac1b workaround broken groff man page config
Fixes #2673
2016-10-19 13:43:04 -07:00
Aaron Gyes
b560daac21 suspend.fish: print help on -h, --help 2016-10-17 15:31:27 -07:00
Hunsu
d474368ea5 Add HTTPS and HSTS options to wget completions (#3470) 2016-10-17 08:31:35 -07:00
Kurtis Rader
a26f68d63f handle multiline commands in history search output
Fixes #31
2016-10-16 21:33:12 -07:00
Kurtis Rader
f490b56378 make history searching case insensitive by default
Fixes #3236
2016-10-16 20:18:16 -07:00
Olivier Perret
36352c0370 Add completions for connmanctl (#3419)
* Add completions for connmanctl

* Move connmanctl functions to completion file

* Add description for services completion in connmanctl

* Fix connmanctl services completion regex

* Also fix connmanctl vpnconnections regex
2016-10-16 11:02:12 +02:00
Kurtis Rader
3663726689 fix interactive deletion of "all" items
While working on making the history command support case-sensitive and
insensitive searches I noticed that entering "all" when interactively
deleting history entries resulted in an error. That's because the
history builtin currently only supports `--exact` so we need to loop
over the matching entries and delete them one at a time.

Fixes #3448
2016-10-11 19:05:23 -07:00
Kurtis Rader
f33ece11ac simplify invoking create_manpage_completions.py
My previous change to avoid creating a *.pyc file when running
create_manpage_completions.py was wrong because I put the
`sys.dont_write_bytecode = True` on the wrong line. Rather than simply
move that statement make the simpler, cleaner, fix that removes the need
for `eval` where that program is invoked.
2016-10-09 18:42:55 -07:00
Kurtis Rader
92e14d7e4a deal with Linux shebang handling
The Linux kernel only splits on the first whitespace in the shebang line
(unlike BSD which splits on all whitespace). Which means there can be
only one argument after the path to the program.
2016-10-09 15:09:44 -07:00
Kurtis Rader
c07c98ac05 eliminate many "unused parameter" warnings
Partially addresses issue #3430.
2016-10-09 14:38:26 -07:00
Kurtis Rader
213ef3ee56 don't produce *.pyc files
Producing man pages is done infrequently (basically just at `make test`
and `make install`) so there isn't any point in writing compiled
byte-code versions of the python modules.
2016-10-09 14:11:04 -07:00
Aaron Gyes
4e1226a313 Fix git prompt noise
Issue reported on Gitter:
> If I go into an empty git repository (i.e. git init) and hit enter a few times, I get:
> fatal: bad revision 'HEAD
2016-10-07 05:59:54 -07:00
Fabian Homborg
91a311c156 Also set vi-cursor in tmux in vte-terminals
Fixes #3429.
2016-10-07 11:47:19 +02:00
Kurtis Rader
f7f39b8c90 make fish's realpath compatible with GNU realpath
After implementing `builtin fish_realpath` it was noticed that it did
not behave like GNU `realpath` without options. Which is super annoying
since that was the whole point of implementing the command. Major
failure on my part since I wrote the unit tests to match the behavior of
the existing `wrealpath()` function that I simply exposed as a builtin
command. Rather than actually verifying it behaved in a manner
compatible with GNU realpath.

Also, while the decision to call the builtin `fish_realpath` seemed to
make sense at the time of the original commit further reflection has
shown that to be a silly, idiosyncratic, thing to have done. So rename
it to simply `realpath`.

Fixes 3400
2016-10-04 20:19:44 -07:00
Branislav Šott
61388cff02 Add completions for ninja build system 2016-10-04 12:32:28 +02:00
Aaron Gyes
c5b17b5310 Quote test check to cause usage ouput 2016-10-02 02:52:34 -07:00
Aaron Gyes
36fe172932 Fix obvious realpath.fish bug.
We want to run the builtin on the argument we just sanitized, not all of them given!
2016-10-02 02:47:12 -07:00
Aaron Gyes
94aeb47f63 improve realpath.fish comments 2016-10-02 02:44:33 -07:00
ridiculousfish
eeea3f3b3c Revert "Add completions for cd -"
This reverts commit 9d69f44550.
2016-10-01 16:48:12 -07:00
Sajjad Hashemian
ca929e088e Add brew services completions 2016-09-28 15:58:38 +02:00
Aaron Gyes
01fa31f313 Fix spelling in realpath.fish 2016-09-27 16:28:24 -07:00
Fabian Homborg
662ba60d63 Guard some contains calls in config.fish
Fixes #3409.
2016-09-26 16:49:06 +02:00
Kurtis Rader
e9b5505169 add a flag to limit history search results
This adds a flag to the `history search` command to limit the number of
matching entries to the first "n". The default is unlimited. This is
mostly useful in conjunction with aliases (i.e., functions) that are
intended to report the "n" most recent matching history entries without
piping the result through the user's pager.

Fixes #3244
2016-09-23 19:43:58 -07:00
Aaron Gyes
4c34ba9959 Make fish_indent less spooky
Don't wrap fish_indent at all if the version in $PATH matches
$FISH_VERSION.

When we do wrap it, resolve the path once, and use that via alias
machinery instead of doing an eval each time.

In both cases, `type fish_indent` can tell us what it's actually going
to do now.

clarity aside, it's faster if we only eval the one time.
eval is not only evil, but slow.

> for h in $history[1..100]; echo $h | fish_indent --no-indent; end

before: CMD_DURATION = 1005
if fish_indent is kosher in PATH: 549
if not, using alias: 687
2016-09-23 07:59:45 -07:00
Kurtis Rader
204e79105a allow customizing history --show-time format
It would make fish more friendly if we allowed the user to specify the
format of the history entry timestamps.

Fixes #3361
2016-09-20 20:14:02 -07:00
Aaron Gyes
2c8bc05826 Skip OSC 7 inside emacs, let VTE/Terminal do title
these modern terminals both compose a nicer title if we don't try to provide a custom one (no path in title twice, "fish" in title twice) - and the user can configure which components they'd like in their terminal inside the terminal preferences.

Also make test "$VTE_VERSION" -ge .. work once I commit `test` strtoi
fix - the trick is to add a zero before it so the numeric comparison
works even if it's empty.

Fixes #107
2016-09-19 18:44:44 -07:00
Andrew Schulman
d71b97c2cf update and correct cygport completions (#3392) 2016-09-19 23:25:55 +02:00
Kurtis Rader
76c73aa8ce alter history sub-command handling
This deprecates the use of long options for history sub-commands (e.g.,
`history --delete`) in favor of proper sub-commands (e.g., `history
delete`). It also eliminates the short options for those sub-commands.

Also change option processing to allow options anywhere on the command
line to match how the vast majority of fish builtins handle flags.

Replace --with-time with --show-time.

Fixes #3367
2016-09-18 20:09:06 -07:00
Aaron Gyes
be0bd999ad Commit __fish_config_interactive where I have it
Nuke the cool surprise deletion feature
2016-09-18 04:18:33 -07:00
David Adam
92e3a3c8ef Merge branch 'master' of https://github.com/fish-shell/fish-shell 2016-09-18 18:12:34 +08:00
Aaron Gyes
96ebfaaf87 Use 'grealpath' if installed for realpath fallback (#3374)
* Use 'grealpath' if installed for realpath fallback

See discussion in #3370

* fish_realpath: filter out dangerous options

Per feedback do not use aliases to declare wrapped functions.
2016-09-18 02:08:19 -07:00
Clément Martinez
fc3cd77c2f Add pygmentize completions 2016-09-16 19:23:22 +02:00
Clément Martinez
22c20f36cb Add ranger completions 2016-09-16 19:23:22 +02:00
Clément Martinez
46ab1a155c Add mdbook completions 2016-09-16 19:23:22 +02:00
Clément Martinez
29b9e6705a Add figlet completions 2016-09-16 19:23:13 +02:00
Clément Martinez
ed7bf83b56 Fix xz file completion
The previous completion gave every files.
Here, we only show files with the .xz, .txz, .lzma or .tlz extension.
2016-09-16 19:22:59 +02:00
Andrew Schulman
0a6dc2addb use PATH to find getent in __fish_complete_groups (#3383) 2016-09-16 18:26:27 +02:00
Andrew Schulman
05b52eaa0b use __fish_complete_groups to complete group names for chown (#3380)
chown completion chown currently uses cat /etc/group to fetch the list of group names. In Cygwin there's no /etc/group file any more (user and group names are fetched directly from the OS), so when a user tries to tab-complete the group name they get an error message:

ASchulma@LZ77E1AASCHULMA ~/d/fish> chown ASchulma🐱 /etc/group: No such file or directory

This change fixes that by using getent group (via __fish_complete_groups) by preference to get the group names, and falling back to /etc/group. This is more portable.
2016-09-16 16:35:55 +02:00
EMayej Bee
85cd372a4e Fix index out of bounds
When current dir is the first one in history. There is no previous dirs.
2016-09-13 20:59:18 -07:00
Kurtis Rader
f9115b5ef1 fix use of subcommand in __fish_config_interactive.fish 2016-09-12 18:47:59 -07:00
Fabian Homborg
9d69f44550 Add completions for cd -
Fixes #3353.
2016-09-12 23:13:32 +02:00
Fabian Homborg
c57b30cba1 Check /etc/os-release for Suse's CNF-handler
This has the same name and path as ubuntu's, but takes less arguments.

So we need to actually find if the distro thinks it is suse, and then
use it.

Fixes #3366.
2016-09-12 22:59:35 +02:00
Fabian Homborg
bb754c2085 ls.fish: Replace eval with string 2016-09-12 20:20:40 +02:00
Aaron Gyes
90e535f66f Update pager colors, tweak pager.cpp
Adds a color reset thing, to ensure fish tries to use hard colors during
testing.

Also, work on a discrepancy (not introduced by my changes, afaik) when
with some combinations of color settings, and usage of --bold, caused super
flakey color paninting in the pager. Downwards movements that trigger
scrolling vs. upwards movement in the pager would only apply bold to
selections when moving upwards. The bold state of the command completions in
the pager was flipping flops on and off, depending on if there is a description
on the preceding line.

Implement a lame fix by reseting the color to normal and applying a
different style on the rightmost ')' which seems to be what was influencing it.

Makes fish use terminfo for coloring the newline glich char.
2016-09-11 03:04:53 -07:00
Aaron Gyes
af95813514 Merge branch 'master' of https://github.com/fish-shell/fish-shell into colorfix 2016-09-10 15:09:12 -07:00
Aaron Gyes
82b298dcc5 __fish_config_interactive: remove Linux exception
And update colors.
2016-09-10 15:07:58 -07:00
Kurtis Rader
87a532f533 make it hard to use history command incorrectly
Fixes #3307
2016-09-09 19:23:06 -07:00
Fabian Homborg
f78f51e2a7 dirh: Don't rely on negative increments in seq
Not available in BSD seq.

Fixes #3354.
2016-09-06 18:15:00 +02:00
George Christou
f0e884075c Mute output from command -v tput (#3355)
The previous change here caused an obviously unwanted path to the `tput` command to be left on the prompt after ^C.
2016-09-06 02:37:52 -07:00
Fabian Homborg
9f6ba5db7a Disable fish_vi_cursor in unsupported TERMs 2016-09-05 14:44:03 +02:00
Fabian Homborg
cac3b239e3 Use fish_vi_cursor by default
Fixes #3215.
2016-09-05 01:28:21 +02:00
Fabian Homborg
b0716885bc Set cursorshape on preexec, reset on post
Fixes #3217.
2016-09-05 01:20:12 +02:00
Fabian Homborg
7ce042ccff Really allow for hybrid bindings
The previous solution would not erase the previous bindings if
fish_vi_key_bindings was called with a mode argument. So if the user
switched to vi with a different initial mode, they'd keep their previous
bindings also.

Supersedes e89057b.
2016-09-05 00:47:37 +02:00
Fabian Homborg
30f26b62e6 Remove duplicate bindings
Some of these were defined in the shared bindings, some (like \cy yank)
were just literally duplicate in the same files.

This should _not_ change anything. In particular this does not remove
hardcoding of sequences (because terminfo might be wrong or the term
might need smkx).

Found with

```
function bind
	set -l binds (builtin bind)
    builtin bind $argv
    set -l newbinds (builtin bind)
    if set -q argv[1]; and not test "$argv[1]" = "--erase"
        if test "$binds" = "$newbinds"
            echo "Duplicate: " (string escape -- $argv)
        end
    end
end
```
2016-09-04 22:48:40 +02:00
Fabian Homborg
e89057b70c Make hybrid bindings easier to achieve
The vi-bindings function would unconditionally erase all bindings,
making it impossible to call it last. This would disable the
mode-indicator (and in future also the cursor).

Make it so any argument to fish_vi_key_bindings stops it from erasing
bindings.

It would also be possible to demand an argument to erase (or to erase as
a separate step). but the usual case seems to be _switching_ to a set of bindings.
2016-09-03 23:11:36 +02:00
Fabian Homborg
1bc887cd9f Vi-mode: Also share end/home bindings
Fixes #3298.
2016-09-03 23:11:36 +02:00
Aaron Gyes
8ca3adaa91 Fix ^C at commandline indicator for FreeBSD
This didn't work on platforms where tput exists but can never accept
terminfo names. This includes the current versions of FreeBSD - it
used to do both, now it doesn't. So, fall back to the old termcap names
by (tput smso; or tput so). Add check for the tput program before we
even try.
2016-09-01 07:30:50 -07:00
Fabian Homborg
443fc66048 alias: Use source directly
The extra things `eval` does are all for code that runs
interactively. Because we just define a function, we don't need it.

This improves alias' performance by about 20-25% (0.783608s to 0.585585s
on about 500 aliases) and avoids triggering #3345.
2016-09-01 12:27:10 +02:00
Fabian Homborg
eeb42f5e54 git completions: Only show last 1000 commits
This can be prohibitively slow on large repositories (minutes!).

While regrettable, no user is going to like waiting that long.

Work towards #3342, rerun of #3230.

Many thanks to @gladhorn for the idea!
2016-08-30 23:25:42 +02:00
Fabian Homborg
3702616b60 pushd: Remove unnecessary forks
Convert sed to string and remove unnecessary math calls.
2016-08-29 00:01:13 +02:00
Frederik Gladhorn
f37995c676 git completion: Limit the number of commits for --fixup (#3230)
Offering auto completion for existing commits is great, but on big
repositories, it suddenly becomes really slow, even with fast hard
disks, since each commit is read and then a line processed for it.

Instead limit to the last 500 commits (arbitrary number) which still
feels fast. Going back further in history can easily and more reasonably
done with git log etc.
2016-08-27 20:23:39 +02:00
Boris Aranovich
5328d6b83c Perforce completions (#3314)
* completions/p4.fish

* Updated per comments + added p4 clients

* p4 completions: integ, opened, reopen. "default" CL support.

* Perforce RCS -> SCM

* p4 reopen: list opened files

* Fixed per review, added -d for all functions

Fixed per comments in review by @faho,
Added -d for all functions,
Renamed ”subcommand" term to “command” (so there’s probably diff noise)

* p4 completions with submit list of files

* p4 completions for submit: lists open files
2016-08-27 20:20:40 +02:00
Cobrand
172541c689 fix error when completing vi if it didnt exist (#3336) 2016-08-27 15:37:18 +02:00
Kurtis Rader
cfefaaf4ee revert the --shadow-builtin flag
Implementing the --shadow-builtin flag has proven to be highly controversial.
Revert the introduction of that flag to the `function` command. If someone
shoots themselves in the foot by redefining a builtin as a function that's
their problem and not our responsibility to protect them from doing so.

Fixes #3319
2016-08-24 22:56:19 -07:00
Jin Liu
476ffe12f6 fish_config: fix binding filter regression (#3327) 2016-08-24 01:30:33 -07:00
Aaron Gyes
b0184f1476 Sync up history completion 2016-08-23 18:07:50 -07:00
Jin Liu
4d04125fa1 fish_config: capitalize keynames to match parser output 2016-08-23 18:40:37 +08:00
Jin Liu
ecaba64056 fish_config: show btab as "Shift Tab" in bindings 2016-08-23 18:40:08 +08:00
Jin Liu
4906a5f390 fish_config: fix keybinding parser bugs
1. \r shown as r
2. putty-specific Home/End
3. backspace
4. show unparsable sequence as "unknown-control-sequence"
2016-08-23 18:34:23 +08:00
Jin Liu
f76e620be8 fish_config: filter out uninteresting bindings
currently: self-insert and 'begin;end'
2016-08-23 17:34:21 +08:00
Jin Liu
bfee664af3 fish_config: group bindings by command, show raw binding commands on click 2016-08-23 17:10:30 +08:00
Fabian Homborg
4e2d2c125c Silence math errors in git prompt
It's not ideal since we can't get the real result so we just assume it's
"0". That triggers the easier path, which still might display the wrong
thing, but we have to pick something.

Possible fix for #3321.
2016-08-22 17:06:29 +02:00
ArkBriar
044efef577 fix broken completion of screen on osx, test on ubuntu and mac (#3271)
* fixes broken completion of screen on osx, test on ubuntu and mac with fish 2.3.1
* replaces sed, __fish_sgrep with fish builtin string
* add completion for `screen -x`
* adjust format (e.g. 12345.socket\t01/01/16 09:55:00 Detached)
2016-08-19 12:00:18 -07:00
Date Huang
5dd959070c Fix brew completion for brew install (#3309)
* Fix brew completion for `brew install`
* Using `brew search` rather than `brew --repository`
- Homebrew migrated the directory holding their Formulas into Taps, breaking fish's completions.
- New method to find all Homebrew-core Formulas
- Compatible with old versions of Homebrew and more future proof
* Replace fixed path to search formula with `brew --repository`
* Replace `sed` with builtin `string replace`
2016-08-19 03:58:37 -07:00
Fabian Homborg
790968120d Give up earlier when we can't find default key bindings.
This relates to #3302.
2016-08-15 22:39:51 +02:00
Jens Fredskov
2a119ff082 Aura: Show installed packages on remove-completion (#3297) 2016-08-11 20:07:59 +02:00
Kurtis Rader
710addde16 fix history --delete regression
The recent change to reconcile the history builtin command and function
broke an undocumented behavior of `history --delete`. This change
reinstates that behavior. It also adds an explicit `--exact` search mode
for the `--search` and `--delete` subcommands.

Fixes #3270
2016-08-10 21:51:01 -07:00
Boris Aranovich
dc02587ac4 __fish_git_prompt: untracked files using git ls-files | wc -l | string trim 2016-08-10 14:51:18 -07:00
Boris Aranovich
077a0e1b47 Counting the number of unstaged files using wc -l pipe 2016-08-10 14:51:18 -07:00
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
Aaron Gyes
3669805627 Improve compatibility with 0-16 color terminals.
Fish assumed that it could use tparm to emit escapes to set colors
as long as the color was under 16 or max_colors from terminfo was 256::

 if (idx < 16 || term256_support_is_native()) {
    // Use tparm to emit color escape
    writembs(tparm(todo, idx);

If a terminal has max_colors = 8, here is what happenened, except
inside fish:

 > env TERM=xterm tput setaf 7 | xxd
   00000000: 1b5b 3337 6d                             .[37m
 > env TERM=xterm tput setaf 9 | xxd
   00000000: 1b5b 3338 6d                             .[39m

The first escape is good, that second escape is not valid.
Bright colors should start at \e[90m:

 > env TERM=xterm-16color tput setaf 9 | xxd
   00000000: 1b5b 3931 6d                             .[91m

This is what caused "white" not to work in #3176 in Terminal.app, and
obviously isn't good for real low-color terminals either.

So we replace the term256_support_is_native(), which just checked if
max_colors is 256 or not, with a function that takes an argument and
checks terminfo for that to see if tparm can handle it. We only use this
test, because otherwise, tparm should be expected to output garbage:

 /// Returns true if we think tparm can handle outputting a color index
 static bool term_supports_color_natively(unsigned int c) { return max_colors >= c; }
...

 if (term_supports_color_natively(idx) {

And if terminfo can't do it, the "forced" escapes no longer use the fancy
format when handling colors under 16, as this is not going to be compatible with
low color terminals. The code before used:

 else {
     char buff[16] = "";
     snprintf(buff, sizeof buff, "\x1b[%d;5;%dm", is_fg ? 38 : 48, idx);

I added an intermediate format for colors 0-15:

 else {
     // We are attempting to bypass the term here. Generate the ANSI escape sequence ourself.
     char buff[16] = "";
     if (idx < 16) {
         snprintf(buff, sizeof buff, "\x1b[%dm", ((idx > 7) ? 82 : 30) + idx + !is_fg * 10);
     } else {
         snprintf(buff, sizeof buff, "\x1b[%d;5;%dm", is_fg ? 38 : 48, idx);
     }

Restores harmony to white, brwhite, brblack, black color names.
We don't want "white" to refer to color color #16, but to the
standard color #8. #16 is "brwhite".

Move comments from output.h to output.cpp

Nuke the config.fish set_color hack for linux VTs.

Sync up our various incomplete color lists and fix all color values.
Colors 0-8 are assumed to be brights - e.g. red was FF0000. Perplexing!

Using this table:
 <http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html>

Fixes #3176
2016-07-24 17:02:29 -07: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
Aaron Gyes
63120a9962 Fix fish_config in .app
* Copy docs into Resrouces
* Export $__fish_bin_dir
* Fix incorrect path in fish.cpp - fish is not in MacOS (it should be!)
2016-07-01 03:57:16 -07:00
Aaron Gyes
807dc82a75 Rename things to avoid conflicts in headers
Was breaking builds

 * ncurses.h: can declare `char *const key_name'.
 * netbsd term.h: has `newline', `lines' macros.
2016-07-01 03:57:16 -07:00
Aaron Gyes
47fbfdca3e Add note about the zombie process 2016-07-01 02:21:13 -07:00
Aaron Gyes
772e35562a suspend output after '\n' not printing before kill 2016-07-01 01:53:43 -07:00
Aaron Gyes
e42f593553 show 'fg' usage for suspend if not forcing 2016-07-01 01:27:03 -07:00
Aaron Gyes
9642fcb589 Update suspend docs. When used, show how to resume
Fixes #3154
2016-07-01 01:18:07 -07:00
Aaron Gyes
7e58a3982a string escape some eval calls 2016-07-01 00:08:46 -07:00
Aaron Gyes
431589a16a Use fish -c string ... as the string fallback.
We can again drop the prompt_pwd check.
2016-07-01 00:00:53 -07:00
Kurtis Rader
cbee315b1b fix the history function and man page
The previous commit to add a `--with-timestamp` flag to the `history` command
caused me to notice the history function didn't recognize the new long option.
Neither did it recognize the short options for the builtin command. This
change fixes both of those issues.
2016-06-30 22:01:59 -07:00
Aaron Gyes
d69a68e265 Comment fixes. 2016-06-26 21:14:45 -07:00
Aaron Gyes
534c1287ca Add back prompt_pwd to solve empty output problem
..by not manipulating path at all if we do not have
the tools to do so.

Tag changes with better comments.
2016-06-26 20:54:04 -07:00
Aaron Gyes
81dee16d69 Add back prompt_pwd to solve empty output problem
..by not manipulating path at all if we do not have
the tools to do so.

Tag changes with better comments.
2016-06-26 20:25:11 -07:00