Dan Anderson | 18 Nov 23:45 2014
Picon

Subcommand quoting?

Attemping to run pkg-config as part of a build:

```
g++ (pkg-config --cflags --libs gtk+-2.0) test.cpp
g++: error: unrecognized command line option ‘-pthread 
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include 
-I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo 
-I/usr/include/pixman-1 -I/usr/include/libdrm 
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include -I/usr/include/freetype2 
-I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/freetype2 
-I/usr/include/libpng16 -I/usr/include/harfbuzz -lgtk-x11-2.0 
-lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 
-lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 
-lfontconfig -lfreetype ’
```

Expected behaviour is to expand the output of `(pkg-config)` and pass 
those flags to `g++`, but it seems that the subcommand output is being 
quoted. Works under bash (with backticks).

Any way to dequote?

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
(Continue reading)

Ryan Burnett | 18 Nov 19:56 2014
Picon

eval command in config.fish

Hi fish fanatics,

I'm using rbenv. Using the regular ol' Terminal I have to add this to my .bash_profile:

eval "$(rbenv init -)"

I've added the equivalent command to my ~/.config/fish/config.fish file:

rbenv init - | source

This worked in fish 2.1, however, I'm running 2.1.1 now and receive this error:

/Users/burnettr/.config/fish/config.fish (line 18): rbenv init - | source
                                                    ^
in . (source) call of file '/Users/burnettr/.config/fish/config.fish',
called on standard input,

How can I add this rbenv init command to my config.fish file?

P.S. I'm running fish 2.1.1 and OS X 10.9.4.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Brian Schlining | 18 Nov 19:04 2014
Picon

First char of autocomplete is wrong color

Hi All,

I’m running into an issue with the color of the autosuggestions. I’ve set the color of the autosuggestion to gray using fish_config. However, the very first character of the autosuggestion is black (my default color); which gets very confusing. I would like it to be gray like the rest of the autosuggestion. I’ve put a screen shot of the issue at https://drive.google.com/file/d/0B8RHIr7J8XHoTzRpLVJ0MTlnLTg/view?usp=sharing

Can anyone give me a pointer on how to fix it? Thanks

body{font-family:Helvetica,Arial;font-size:13px}


-- 
Brian Schlining

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Mario Castelán Castro | 16 Nov 23:48 2014

Using fish without fishd

Hello.

Is it possible to use fish without "fishd" even if it loses some 
functionality?. Specifically, is it possible to configure "fish" so as 
to not to start "fishd" and not to print an error message about lacking 
"fishd"?.

Regards and thanks.

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
charlie | 15 Nov 16:06 2014
Picon

Exit status in functions

Hi All, I've tried a couple ways and I can't get it to work, the first way is always starting firefox

function select_or_start_ffx
                  status = (wmctrl -a "Firefox")
                  if status == 0
                      firefox
                  end
end

and for this version

function select_or_start_ffx
                  wmctrl -a "Firefox"
                  if $status == 0
                      firefox
                  end
end


I get the error

Standard input: if $status == 0
                   ^
in function “select_or_start_ffx”,
called on standard input,

No command '$status' found, did you mean

whats the proper way to do this ?
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Jürgen Haas | 13 Nov 16:48 2014
Picon

How to write dynamic fish completions


Hi all,

within fish I'm heaviliy using drush, a shell extension for the Drupal
CMS with a lot of options that are also sometimes context sensitive.

For bash, the drush package contains a drush.complete.sh which can be
sourced for terminal sessions. That looks like this:

=================== START ============
# Completion function, uses the "drush complete" command to retrieve
# completions for a specific command line COMP_WORDS.
_drush_completion() {
  # Set IFS to newline (locally), since we only use newline
separators, and
  # need to retain spaces (or not) after completions.
  local IFS=$'\n'
  # The '< /dev/null' is a work around for a bug in php libedit stdin
handling.
  # Note that libedit in place of libreadline in some distributions. See:
  # https://bugs.launchpad.net/ubuntu/+source/php5/+bug/322214
  COMPREPLY=( $(drush --early=includes/complete.inc "${COMP_WORDS[ <at> ]}"
< /dev/null 2> /dev/null) )
}

# Register our completion function. We include common short aliases
for Drush.
complete -o bashdefault -o default -o nospace -F _drush_completion d
dr drush drush5 drush6 drush7 drush.php
=================== FINISH ============

I'm trying to port this to fish and came as long as this:

complete -x -c drush -d "Dr" -a "(drush --early=includes/complete.inc)"

This is working to a certain extend such that it displays all options
almost all of the time. What I need is to provide the specific command
line COMP_WORDS to the script complete.inc. What is the right syntax
for that? I looked into variable expansion but could figure it out.

Once that's complete I should also define the local variable IFS=$'\n'
and I'd appreciate if anyone could give me a hint on how to get all of
this into a single command or a function for the fish shell.

Thanks in advance.

Jürgen

--

-- 
http://www.paragon-es.de
http://about.me/jurgenhaas
Santhosh T | 13 Nov 00:51 2014
Picon

Re: how to echo minus symbol

acutally i am trying to create my own git prompt for fish

the prompt will be:

-branchname* $

branchname is prefixed with "-" if it is behind remote-branch, 
or prefixed with "+" if it is ahead of remote-branch
and no prefix if it is up-to-date with remote-branch

branchname is suffixed with "*" if working directory is dirty, otherwise no suffix will be there

thanks
santhosh




On Thu, Nov 13, 2014 at 5:16 AM, Santhosh T <santhosh.tekuri <at> gmail.com> wrote:
mine is 2.1.1

i tried same in bash. and bash also does not print anything

thanks
santhosh

On Thu, Nov 13, 2014 at 5:13 AM, Diego Zamboni <diego-rOWHp+otX9dg9hUCZPvPmw@public.gmane.org> wrote:
Hi Santhosh,

It works fine for me:

➜ ~ echo $FISH_VERSION 
2.1.1-1075-g701a37f
➜ ~ echo -
-

—Diego


On Nov 12, 2014, at 5:39 PM, Santhosh T <santhosh.tekuri <at> gmail.com> wrote:

the command:

echo -

prints nothing

i tried following also:

echo "-"
echo '-'

but following works:

echo -e "\x2D"

what is so special about symbol "-"

the documentation also doesn't say anything special case for minus symbol

thanks
santhosh
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk_______________________________________________
Fish-users mailing list
Fish-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/fish-users



------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Santhosh T | 13 Nov 00:39 2014
Picon

how to echo minus symbol

the command:

echo -

prints nothing

i tried following also:

echo "-"
echo '-'

but following works:

echo -e "\x2D"

what is so special about symbol "-"

the documentation also doesn't say anything special case for minus symbol

thanks
santhosh
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Santhosh T | 12 Nov 23:47 2014
Picon

$history[1] is not working in fish_prompt

$history[1] is not wrking in fish_prompt

but 
says it is fixed;

i am using fish, version 2.1.1

thanks
santhosh
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Santhosh T | 12 Nov 23:45 2014
Picon

or condition in if not notwiking

if test a = b; or test c = c 
    echo inside
end

when executing above script it should print "inside"
but it does not print any thing.

how do i put "OR" condition in "if"

thanks
Santhosh



------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Marcin Zajączkowski | 11 Nov 23:53 2014
Picon

Re: Problem with -n in a conditional statement

On 2014-11-11 23:44, Greg Reagle wrote:
> On Tue, Nov 11, 2014, at 05:29 PM, Marcin Zajączkowski wrote:
>> The next problem I encounter is how to check two variables in one if
>> statement.
> 
> There are several ways of doing this.  Here is one:
>     set -q $COLUMNS $LINES; if test $status = 2; echo both defined; end

Thanks Greg. The following works fine for me:

if set -q COLUMNS LINES
  ...
end

(you probably accidentally put $ signs before `set` parameters)

Marcin

> Note that this means that the man page for set is incorrect.  It
> currently says "exit status is the number of variables specified that
> were not defined", but it the way it actually behaves for me is "exit
> status is the number of variables specified that were defined".

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Gmane