Commit graph

28 commits

Author SHA1 Message Date
ridiculousfish
a5fd0b317e Revert "Switch to bare vars in our math invocations"
This reverts commit bd18736ee5.

Bare variables should only be used in commands that must
manipulate the variable stack, such as `set`.
2017-09-09 23:35:47 -07:00
Kurtis Rader
bd18736ee5 Switch to bare vars in our math invocations
Using bare vars is more efficient because it makes the builtin `math`
expression cache more useful. That's because if you prefix each var with
a dollar-sign then the fish parser expands it before `math` is run.
Something like `math x + 1` can be cached since the expression is the
same each time it is run. But if you do `math $x + 1` and x==1 then you're
effectively executing `math 1 + 1`. And if x==2 the next time then you're
running `math 2 + 1`. Which makes the expression cache much less effective.
2017-08-24 12:38:10 -07:00
Kurtis Rader
5ef8b91db8 fix three explicitly translated messages 2017-06-02 20:40:58 -07:00
Kurtis Rader
75f1e36b44 a step to remove __fish_sgrep per issue #2450 2017-04-15 21:49:08 -07:00
Wilke Schwiedop
a927efa015 remove "cat file |" from scripts 2016-12-21 13:46:43 +01: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
Sam Yu
7e014174b8 __fish_print_packages: use libzypp builtin cache for zypper 2016-03-30 15:03:51 +02:00
Spittie
a00e26b109 Fix package listing for zypper
-E is only supported by BSD sed, switch to -r which is also supported
by GNU sed
2016-02-12 23:00:40 +01:00
Fabian Homborg
b85a8bbbfe Rename sgrep to __fish_sgrep
Makes it harder to cause issues with aliases, see fish-shell#2245
2015-09-09 20:55:04 +02:00
David Adam
a6a41d159c __fish_print_packages: add support for zypper
Closes #1787.
2014-11-13 18:15:35 +08:00
Kevin Ballard
533496e43a Adopt the new type -q flag in the other functions 2014-07-13 19:11:29 -07:00
David Adam
3225d7e169 avoid symlink attacks in __fish_print_packages and spawning fishd
* use $XDG_CACHE_HOME for __fish_print_packages completion caches
 * when starting fishd, redirect fishd output to /dev/null, not a
   predictable path

Fix for CVE-2014-3219.

Closes #1440.
2014-05-12 09:30:05 +08:00
Eric Mrak
64ca6c066c Caching for pacman packages. 2014-02-16 18:09:55 +08:00
Eric Mrak
d1cf5ab286 adding completion for aura. adding pacman integration for __fish_print_packages 2014-02-16 18:09:55 +08:00
David Adam
8fbffe250a __fish_print_packages: correct syntax for yum, improve yum/rpm pipelines
Closes #1269 (output to cache file).

Reworks the editing pipeline for both yum and rpm completions down to a
single sed command.
2014-01-29 12:47:56 +08:00
Max Gonzih
71f6986dd6 Fix __fish_print_packages for rpm 2014-01-13 22:36:02 +08:00
David Adam
7935b1613a __fish_print_packages: ignore errors, do less manipulation
Closes #479 by piping STDERR to /dev/null.

Also does much less manipulation of the package list; there are no
packages in any of the archives containing the names that are stripped
out as far as I can see.
2013-09-17 22:27:15 +08:00
David Adam
8df81f93c8 __fish_print_packages: whitespace fix 2013-09-17 22:20:16 +08:00
James French
292908c00a Portmaster completions
* Added FreeBSD's pkg to __fish_print_packages
* Portmaster completes on installed packages and ports
* Options list as per fish_generate_completions, needs to be tidied
  up further but will suffice for now
2013-06-17 00:14:16 -07:00
aliva
3bfcd5e105 recreate yum-cache file every six hours. 2013-03-02 01:48:56 +03:30
aliva
87aca05e7f autocomplete 'yum install' using yum cache 2013-03-01 23:27:03 +03:30
James Bowlin
46986ad4c2 Use eix instead of emerge when possible
On Gentoo the eix program is MUCH faster than emerge for listing package
names.  I've left the emerge code in as a 2nd choice because not every
Gentoo system has eix installed (although they should).  Also,  the
emerge code didn't seem to produce any output on my system.

Signed-off-by: Grissiom <chaos.proton@gmail.com>
2010-12-02 01:33:56 +08:00
Grissiom
70322077d2 remove trialing spaces #2 2010-09-18 10:18:26 +08:00
axel
fd11f294bc Use the math function instead of calling bc directly in various places
darcs-hash:20061212171118-ac50b-a40709edf008f3d725e3755d5282ae5a84818c88.gz
2006-12-13 03:11:18 +10:00
axel
f64364cced Replace all internal uses of grep with sgrep, which is a wrapper around grep that strips away any GREP_OPTIONS. This is needed to avoid users who have added arbitrary switches to GREP_OPTIONS, thus changing its behaviour.
darcs-hash:20061129140004-ac50b-485ff6bfd71e9459ba62461f6e093ca5c9ddd664.gz
2006-11-30 00:00:04 +10:00
axel
d58b9de63b Use 'type -f' instead of 'which' to test for presense of command, since the latter does not set the exit status correctly on all platforms
darcs-hash:20060314002127-ac50b-6ed726bdcc9e3a7a9608a904c382973799dc73ef.gz
2006-03-14 10:21:27 +10:00
axel
3b6d8756ea Fix various uses of the GNUism of allowing backslash escapes in the second half of a sed regexp substitution
darcs-hash:20060302112808-ac50b-46cdf8e99f8f6e8cab0d54f32cf4e4d309775aa1.gz
2006-03-02 21:28:08 +10:00
axel
343cafef34 Redo installation file structure, move lots of things to $PREFIX/share/fish
darcs-hash:20060217101339-ac50b-d93d2c620a4b7f75f05ff461a6edbee001da7613.gz
2006-02-17 20:13:39 +10:00
Renamed from init/functions/__fish_print_packages.fish (Browse further)