Commit Graph

3401 Commits

Author SHA1 Message Date
David Adam
2c39d5b6c0 fall back to ANSI terminal type if setupterm fails
Closes: https://github.com/fish-shell/fish-shell/issues/1060

'ansi' should always be present (tested on Solaris, Linux, FreeBSD,
Darwin).

Also overrides TERM so that other programs behave consistently e.g.
fish_pager.

The error message makes no specific mention of terminfo or termcap as
these vary across operating systems.

(r+ @ridiculousfish with thanks)
2013-11-26 21:56:49 +08:00
David Adam
8d1667e9e8 more detailed debugging when terminal type cannot be found
Ref: #1060
2013-11-26 21:56:49 +08:00
ridiculousfish
5b3397359f Fix support for backslash-newline in double quotes in unescape functions. Makes tests pass
again.
2013-11-26 01:39:16 -08:00
d10n
ded64758d5 Fix wide character wrapping.
The intention of the block removed appears to be to indent wrapped lines to the column the line started at. What actually happens is that all wrapped lines wrap to column 0.
After adding the sticky short prompt feature, the block removed caused a bug with wrapping wide characters in addition to not appearing to change anything else.
Wide characters would change between wrapping to column 0 and the column the command started at, depending on what column the wide character was at before wrapping.

I am keeping the existing behavior rather than restoring the block's original intention. If the original intention should be restored, it should be on a different branch.
2013-11-26 00:51:02 -08:00
d10n
2813dcc6cc On short prompts, commands wider than the terminal do not reposition to start on their own lines. 2013-11-26 00:51:02 -08:00
Misty De Meo
0a54558ee2 Update brew completion with new options 2013-11-26 00:45:13 -08:00
d10n
168d25e780 Do not open CLI browsers when using fish_config.
From the Python webbrowser documentation:
"If text-mode browsers are used, the calling process will block until the user exits the browser."

Running fish_config on an ssh server with no GUI browser will open a CLI browser which blocks and stops the server from handling requests.
Using multiprocess to run the server in the background lets CLI browsers access the page, but the page is unusable.

For now, disable CLI browsers and recommend opening the page in a graphical browser.
In the future, maybe write a CLI utility to change prompts and delete history items.
2013-11-26 00:41:09 -08:00
ridiculousfish
63a15e232b Fix indentation in __fish_complete_cd 2013-11-26 00:07:18 -08:00
Jörg Thalheim
cb86b8f8fc cd completion: handle not accessible directories 2013-11-26 00:04:31 -08:00
Konrad Borowski
312977d5a6 Fix %lu for size_t in fish_tests.cpp 2013-11-25 16:15:36 +01:00
Konrad Borowski
3eac5f9ab7 Fix io_buffer_t::print to take unsigned long argument. 2013-11-25 16:10:14 +01:00
Konrad Borowski
fcb3f36065 Ensure the loop in offset_of_next_item_fish_2_0 is executed.
This ensures that timestamp will be initialized.
2013-11-25 16:07:17 +01:00
Konrad Borowski
ac7a461070 Cast size_t to unsigned long.
printf expects unsigned long (%lu) argument, however, size_t doesn't
have to be declared as such. As %zu is C99 (but not C++), it shouldn't
be used directly. Instead, I have to cast value to the correct type.
2013-11-25 15:56:08 +01:00
ridiculousfish
8ceb4b83a4 Remove old unescape() function 2013-11-24 23:29:25 -08:00
ridiculousfish
9f6223311e Large cleanup and refactoring of unescape() function. 2013-11-24 22:58:39 -08:00
Konrad Borowski
90b78326d3 Cast timestamp before using it for formatted string.
time_t doesn't necessarily have to be a long number. In fact, manpage
for types.h mentions it can be a double value.
2013-11-19 18:36:20 +01:00
Siteshwar Vashisht
8fc26c1e58 Use fish from $__fish_bin_dir while calling fish_update_completions at startup 2013-11-17 16:24:00 +05:30
Siteshwar Vashisht
6eb7530f75 Do not show files in modprobe completions 2013-11-17 01:21:28 +05:30
Thierry Goettelmann
76ab22f74c Fix modprobe completion for newer modprobe versions 2013-11-16 20:13:41 +01:00
bot47
cfbb511d26 Fixes misleading "connect: Connection failed" message on start up
When launching the first instance of fish and fishd is not launched already, this should not be considered an error as long as it can be launched. So ignore the first failure of connect(), as the calling function get_socket() will try again. May need a bit of cleanup.
2013-11-14 09:46:55 +01:00
David Adam
14b6d32fe6 add bindings for PuTTY's I-can't-believe-it's-xterm keyboard
(see #170)
2013-11-13 11:20:59 +08:00
Siteshwar Vashisht
0de26732bf Don't show warning while generating man page completions on startup 2013-11-12 22:14:14 +05:30
Siteshwar Vashisht
0f02997bcc Autogenerate manpage completions in background if they do not exist 2013-11-12 22:14:14 +05:30
David Adam
63d93a2f9a document new F1 binding 2013-11-09 20:12:53 +08:00
Konrad Borowski
ba2fcd9dae Use basename for man argument
This protects from providing paths to man, like `./a.out`.
2013-11-09 19:50:38 +08:00
Konrad Borowski
c0ad54fe02 Allow reading manpages by using F1. 2013-11-09 19:50:38 +08:00
Marc Joliet
fe3bca3a88 Prefer standard library lzma module if available
Prefer the standard library lzma module if available.  This change prevents
using the backports-lzma when it is installed for a version of Python that
already has the lzma module in its standard library.
2013-11-09 19:46:42 +08:00
David Adam
8621399d78 configure/Makefile: respect $LIBS, remove some egregarious lies
- expunge LIBS_COMMON, it doesn't get used anywhere
 - don't reset LIBS to empty
 - move the gettext test as every binary depends on it
 - only include one set of libraries
2013-11-09 19:43:32 +08:00
David Adam
6640167410 improve diagnostics for socket connections to fishd 2013-11-05 16:15:34 +08:00
ridiculousfish
6d542b8bb0 Integrated new German translation provided by Benjamin Weis 2013-11-03 10:07:42 -08:00
Konrad Borowski
e86d31e7a5 s/Procces/Process/. Fixes #1082. 2013-10-31 21:57:15 +01:00
Konrad Borowski
c5c59d4acb Implement file autocompletion for git add and git checkout.
Fixes bpinto/oh-my-fish#59.
2013-10-31 21:24:58 +01:00
Antoine Gourlay
4dc40b83e4 Fix broken links in tutorial 2013-10-31 16:37:11 +01:00
devlin zed
f186812f18 clobber the prompt when it exceeds the screen width, not when it equals it
Closes #1069
2013-10-29 21:48:42 +08:00
Asger Hautop Drewsen
4a6592597a Make type -a print all executables in PATH 2013-10-29 13:32:14 +08:00
David Adam
afb9401fc7 update URL for nightly builds 2013-10-29 13:20:51 +08:00
Geoff Nixon
3c65cd41a5 Link with $CXXFLAGS; disable GCC-specific autoconf check (squash fixes). 2013-10-29 10:39:12 +08:00
David Adam
8376a44f65 set docdir in Xcode build
fixes part of #1070
2013-10-29 09:30:42 +08:00
David Adam
9a36435016 use docdir from configure in setting __fish_help_dir
Closes #1065
2013-10-29 00:01:21 +08:00
David Adam
edc4614e63 add completions for source and document the move away from '.'
Closes: #310
2013-10-28 23:33:24 +08:00
ridiculousfish
cf766b55cc Fix formatting 2013-10-26 15:27:39 -07:00
ridiculousfish
03c65d7a96 Clean up interactive session test 2013-10-26 15:24:49 -07:00
ridiculousfish
e05743d0ba Fix for errant SIGHUPs due to child fish shells messing with the term.
Fixes https://github.com/fish-shell/fish-shell/issues/1002
2013-10-26 15:22:20 -07:00
Konrad Borowski
e204ced1ae Disallow package names with dots.
They cannot be used as arguments (Perl thinks it's version check, but
version checks are pointless for oneliners), and Debian puts path
containing version depending directories (like 5.14.2) in Perl path.
2013-10-25 19:36:10 +02:00
Brian Gernhardt
59dd6678c3 git_prompt: Allow all set_color arguments
There is no need to explicitly check for two arguments and set --bold.
Instead the user can simply "set __fish_git_prompt_color_flags --bold
red".

The current check violates the expectation set by the documentation
that you can use any set_color argument as the current code interprets
"--bold red" as "--bold --bold" instead.

Plus, by passing the full contents of the variable directly, the user
can do more adventurous things like set the background as well.
2013-10-21 12:36:42 -04:00
Brian Gernhardt
137463dc6d git_prompt: Add upstream_prefix when verbose
git.git's git-prompt may not contain a configurable prefix, but it
does display a space before the upstream information when displaying
verbose information.  Rather than using a space always or never,
default to a space whenever verbose is in showupstream.
2013-10-21 12:34:14 -04:00
Brian Gernhardt
b652920500 git_prompt: optionally show upstream branch name
Adds a "name" option to __fish_git_prompt_showupstream that shows an
abbreviated branch name when the upstream type is verbose.

Based on git.git 1f6806c: git-prompt.sh: optionally show upstream
branch name
2013-10-21 12:08:43 -04:00
Konrad Borowski
fd25a6425c Fix two memory leaks. 2013-10-19 22:10:26 +02:00
Konrad Borowski
2a6eb83fb4 Merge pull request #1015 from marcecj/add_bz2_lzma_xz_support
Support bzip2 and lzma/xz compressed man pages
2013-10-18 05:09:00 -07:00
Konrad Borowski
ef99a11001 Remove unused values in builtin_set. 2013-10-17 19:01:20 +02:00