git has options that can appear before commands, but not all of
them, and some of them need an argument. This means
`__fish_seen_subcommand_from` will give too many false-positives, while
`[ (count $cmd) -eq 2 ]` will give too many false-negatives.
Instead go through all arguments and check if they are in that list of
options that can be before a command and skip the argument for them, if
any.
Teach Xcode to run new script xcode_version_gen.sh before building
the fish_shell and fish_indent targets. The script generates file
fish-build-version.h for inclusion by fish_version.cpp.
Note that Xcode always runs the script because of the phony target
named force-fish-build-version.h, but fish-build-version.h is only
touched if the contents of FISH-BUILD-VERSION-FILE change.
Fixes#890
This is to the benefit of systems with ancient GNU sed, which does not
recognize "-E", but only "-r".
Fixes#2305 - even if it doesn't replace all `sed -E` invocations in the
codebase, the others are unlikely to occur on CentOS and other similarly
crusty systems.
`__fish_apm_using_command` was incorrectly taking lists of commands, new function added to support multiple a command having synonyms.
Simplify switch statement
Also remove superfluous function.
Allow for multiple completions after a command
Useful for removing packages, will complete for more than one.
Code improvements
`sort -u | uniq` is completely redundant, calling grep for every
status-pair is unnecessary, `contains` doesn't take the word "in" as
special.
None of these are critical and there's basically no performance benefit
since this function is utterly dominated by hg calls.
This doesn't add anything except slowing the function down by about
33%. Checking for a branch is just as good and that is displayed in the
prompt anyway.
commit 33c7c4df307b144652d6d842472aa843cc6a5420
Author: Ian Ray <ianjray@me.com>
Date: Sat Sep 26 21:28:50 2015 +0300
Fix xcode include paths for pcre2.h
commit 03d255a3e5e2e9b109c0bc6789ffa431381b6cb3
Author: Ian Ray <ianjray@me.com>
Date: Sat Sep 26 21:02:42 2015 +0300
Fix xcode include paths for pcre2.h
According to the newer code below:
xdg_data_home = os.getenv('XDG_DATA_HOME', '~/.local/share')
the actual default path is ~/.local/share/fish/generated_completions/
This is used in at least 4 places, all of which have a bug in that they
print "options" as a valid repo. It seems better to fix it once,
especially given that there are tons of AUR helpers and pacman wrappers,
all of which might need this info.
net_tools, which provides `ifconfig` and `netstat`, among other things,
has last been updated in 2013. This means `ifconfig` on linux is
basically dead.
Instead of ifconfig, use `ip` (from iproute2), which is much more powerful and
provides a much more annoying commandline syntax.
Instead of netstat, just look at /sys/class/net.
This change eliminates global variables like stdout_buffer. Instead we wrap up
the IO information into a new struct io_streams_t, and thread that through
every builtin. This makes the intent clearer, gives us a place to hang new IO
data, and eliminates the ugly global state management like builtin_push_io.