Commit graph

6659 commits

Author SHA1 Message Date
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
Kurtis Rader
949fc7bdd7 fix IWYU lint
Commit 8645aa94 was made because it seemed necessary at the time.  However,
when I run `make lint-all` now it complains about include loops for header
`signal.h`. This reverts part of that earlier commit to get sane behavior
from IWYU again.
2017-02-01 22:06:24 -08:00
Kurtis Rader
44cfe3e340 remove dependency on xxd
Fixes #3797
2017-01-31 22:10:53 -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
ridiculousfish
f48291b70c Add #include<atomic> to env_universal_common.cpp
Should fix the Linux builds
2017-01-30 13:41:17 -08:00
ridiculousfish
2a472af7b8 Add sanity checking to LRU cache 2017-01-30 12:59:01 -08:00
ridiculousfish
927a678056 Add support for sorting in LRU caches
Performs an in-place merge sort
2017-01-30 10:25:17 -08:00
ridiculousfish
2565ffab25 Make a bool atomic in env_universal_common.cpp
Fixes a race identified by thread sanitizer
2017-01-29 21:42:33 -08:00
ridiculousfish
cb70ac6932 Use a std::atomic in test_iothread
Reduces noise from thread-sanitizer
2017-01-29 21:35:22 -08:00
ridiculousfish
e8d90dbf4b Remove support for the builtin_script_t feature
This was an old experiment to compile scripts directly into the
shell itself, reducing the amount of I/O performed at startup.
It has not been used for a long time. Time to remove it.
2017-01-29 21:34:30 -08:00
ridiculousfish
6db372133d Clean up and adopt owning_lock in intern.cpp 2017-01-29 21:19:39 -08:00
ridiculousfish
f220250ada Adopt owning_lock in wgettext 2017-01-29 21:12:23 -08:00
ridiculousfish
4ac2cfba61 Adopt owning_lock in iothread.cpp 2017-01-29 21:06:46 -08:00
Clément Martinez
0df65a106d Add setsid completions 2017-01-29 20:06:32 -08:00
ridiculousfish
0fefdb458f Revert "Adopt owning_lock and some cleanup of termsize storage in common.cpp"
Tests are failing on Travis but not locally

This reverts commit c5d9e7e391.
2017-01-29 19:33:30 -08:00
ridiculousfish
8aab725782 Make autoload_t no longer virtual
Equip it instead with a function pointer that it invokes
when a command is removed
2017-01-29 18:56:55 -08:00
ridiculousfish
c5d9e7e391 Adopt owning_lock and some cleanup of termsize storage in common.cpp 2017-01-29 18:15:38 -08:00
ridiculousfish
3569987c81 Adopt owning_lock in builtin_commandline 2017-01-29 18:15:38 -08:00
ridiculousfish
10a2275c34 Adopt owning_lock in history_collection_t 2017-01-29 18:15:38 -08:00
ridiculousfish
017836cffa Adopt owning_lock for job_ids 2017-01-29 18:15:38 -08:00
ridiculousfish
eaf143dd8a Introduce owning_lock template
Will enable rust-style lock ownership semantics
2017-01-29 18:15:38 -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
Kurtis Rader
973097f025 style fixups 2017-01-29 18:00:48 -08:00
ridiculousfish
e52a04e341 Cleanup of LRU cache implementation
Switch to CRTP from virtual functions and improve ownership semantics.
It's no longer necessary for clients to use new and delete.
2017-01-29 12:16:42 -08:00
Clément Martinez
61f272495d Add i3-msg completions 2017-01-28 19:48:57 +01:00
Clément Martinez
0d170222a6 Update french translations 2017-01-28 19:48:00 +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
ridiculousfish
05d569ee44 Simplify error case of token_type_description and keyword_description
Simply return a constant string, since in practice the error case
is not hit
2017-01-26 17:47:24 -08:00
ridiculousfish
a40f491c93 Defeat some miscellaneous warnings in the g++ build 2017-01-26 17:33:48 -08:00
ridiculousfish
e78cefd759 Defeat "enumeral mismatch" g++ warnings through typecasting 2017-01-26 17:18:38 -08:00
ridiculousfish
07c9f0de9d Set -Wno-missing-field-initializers
Suppresses a hugely annoying warning in g++ build for
code initialized via the ={} idiom (which is safe).
2017-01-26 16:34:55 -08:00
ridiculousfish
1efb81456b Use std::move instead of swap in a few places where it improves clarity 2017-01-26 16:14:50 -08:00
ridiculousfish
fec83fa975 Eliminate moved_ref
Use real rvalue references instead
2017-01-26 15:43:46 -08:00
ridiculousfish
1634c9df78 Make job_get_flag and job_set_flag instance methods of jobs
Makes them easier to call when you have a smart pointer
2017-01-26 15:06:58 -08:00
ridiculousfish
14fb38f952 Switch job handling to use shared pointers instead of raw pointers
Clarifies memory management around allocation of job_ts
2017-01-26 14:47:32 -08:00
ridiculousfish
1d9cc12984 Repair control-C cancellation of loops
Commit ab189a75 introduced a regression where we stop breaking out
of loops in response to a child death via a signal. Fix that regression.

Also introduces a test to help ensure we don't regress in the future.

Fixes #3780
2017-01-26 13:41:56 -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
ridiculousfish
2fb1d5900d Use true and false for bool, not 0 and 1 2017-01-26 12:51:22 -08:00
ridiculousfish
59a3968fd2 Switch to using unique_ptr in env_node_t
Makes our memory management of the variable stack more explicit
2017-01-26 12:51:22 -08:00
ridiculousfish
8e577b01bc Migrate "unspecified scope" logic for set into var_stack_t 2017-01-26 12:51:22 -08:00
Fabian Homborg
7d44f8e871 Add usermod completions
Fixes #3775.
2017-01-26 21:40:05 +01:00
ridiculousfish
8d2dfdf2c9 Migrate environment variable cache into var_stack_t 2017-01-26 12:03:14 -08:00
ridiculousfish
dabc34e0f9 Migrate next_scope_to_search into var_stack_t 2017-01-26 11:32:45 -08:00