Andrew Toskin | 24 Jul 05:19 2016
Picon
Gravatar

How to avoid printing $fish_greeting before the "read" command prompt

I'm using fish 2.3.1, in GNOME Terminal 3.20.2, on Fedora 24 (64-bit).

I'm writing a simple script that uses the read command to get info from the user before continuing. Every time the script runs, when it gets to the first "read" line, it prints the "$fish_greeting" variable, which I find a little distracting.

I do not have this issue with another, much more complicated script I wrote, perhaps because all the read commands are in excessively deeply nested switch cases and conditionals...

For my simple script, the only workaround I've been able to figure out is to set fish_greeting to an empty string -- however, even when I use set --local, that seems to permanently remove the fish greeting for all future sessions, not just when running the script. Some users of my script may not like that. Is this a bug in fish? Is there another way to avoid print the fish_greeting in a script?

Thanks,
~Andrew
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Patrick | 19 Jul 01:37 2016

accessing fish environment variables from C or other languages

Hi Guys

I am actually using COBOL not C but I can program in C and that would be 
common ground with more people.

What I would like to do, is to write a fish script that ran a bunch of 
commands returning the values in environment variables. I would then 
like to access those variables from C( actually COBOL).

I know this can be done with bash but is there a way to do it with fish ?

The standard libraries will assume bash not fish.

Thanks-Patrick

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
Kurtis Rader | 16 Jul 03:27 2016
Picon

do you use `history --delete`?

if you use the `history --delete` command please read https://github.com/fish-shell/fish-shell/issues/3242 and comment on the proposal to remove the (broken) ability to delete individual entries.

--
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Michael Stillwell | 12 Jul 22:39 2016
Gravatar

Parameter expansion (globbing) on a variable?

Is there any way to force fish to perform parameter expansion on a
variable? That is, if a variable is equal to "*.txt", how can that be
expanded to "bar.txt baz.txt" or "" or whatever it actually matches?

The motivation for this is so that it's possible to write a function
"append_to_path_if_exists" that appends its argument to
fish_user_paths if and only if the argument actually exists as a
directory. So I want to be able to do:

append_to_path_if_exists "/Applications/ghc-*.app/Contents/bin"
append_to_path_if_exists "~/.gem/ruby/*/bin"
append_to_path_if_exists "/usr/lib/go-*/bin"

Without the quotes, fish (now) whines if these directories don't
exist, but with the quotes, I can't figure out a good way to actually
expand the argument within the append_to_path_if_exists function.

This is sort of possible via a subshell, but it's hardly ideal:

function glob
  echo (fish -c "count $argv > /dev/null ; and echo $argv")
end

$ glob "*.txt"
bar.txt baz.txt
$ glob "jjj*"

(Also doesn't work with multiple arguments.)

Am I going about this the wrong way?

Michael

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
Andrew Schulman | 8 Jul 23:09 2016
Picon

compare version strings

What's the best (simplest, most efficient, or however) way to compare two
version strings in fish?  Any better way than writing a custom function?

For example, I want to test if the current running version of fish is less than
2.3.1.  I want to compare $FISH_VERSION to 2.3.1, using the version component
ordering.

I looked around for builtins or standard commands for this and I didn't find
any.

Thanks,
Andrew

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
David Adam | 3 Jul 15:45 2016
Picon
Picon
Picon

Fish 2.3.1 release


Hi all,

I am pleased to announce the release of version 2.3.1 of the fish shell.

This is a functionality and bugfix release. This release does not contain 
all the changes to fish since the last release, but fixes a number of 
issues directly affecting users at present and includes a small number of 
new features.

The tarball and packages for Linux, OS X and Windows will soon be 
available from https://fishshell.com/ and the release notes will be at 
https://fishshell.com/release_notes.html - but in the meantime I have 
uploaded the release to the GitHub releases page at:
  https://github.com/fish-shell/fish-shell/releases/tag/2.3.1

As always, before upgrading, please read the release notes carefully, 
although there should be no backward-incompatible changes.

The Linux packages will be released to the release:2 channel shortly, and 
if you are using your system package manager to install fish from these 
channels a new version will make its way to you soon.

For our distributors, the tarball is available at 
https://github.com/fish-shell/fish-shell/releases/tag/2.3.1 - the SHA-256 
sum is 328acad35d131c94118c1e187ff3689300ba757c4469c8cc1eaa994789b98664 
and the tarball has a signature from my personal PGP key, as does this 
message.

Happy fishing!

David Adam
fish committer
zanchey@...
Glenn Jackman | 28 Jun 23:15 2016
Gravatar

Re: About funced

So, if you do `type myfunction` then `funced myfunction` then `type myfunction`, you don't see your changes saved? I can't explain that.

When you `funcsave myfunction`, fish updates the file $HOME/.config/fish/functions/myfunction.fish -- documentation


On Tue, Jun 28, 2016 at 5:10 PM, Pito Salas <pitosalas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hm.. What I meant was that once I exit the editor, and then access the function from the same shell session it doesn’t seem to have changed. I assumed that funcsave myfunction is needed only if I want to have it be present in a future session. Is that true?

Which also brings up another question I was wondering about: if I funced and funcsave a built-in function, e.g. fish_prompt, where is that saved? 

Thanks!

Pito


On Jun 28, 2016, at 5:06 PM, Glenn Jackman <jackman-OluoqhbZH7VBDgjK7y7TUQ@public.gmane.org> wrote:

What do you mean "doesn't stick"? Did you use `funcsave myfunction`?

On Tue, Jun 28, 2016 at 4:57 PM, Pito Salas <pitosalas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
I have atom configured as my $EDITOR

When I funced for example fish_prompt, it correctly launches atom but the edited function doesn’t seem to stick. Any thoughts on what I might be doing incorrectly? Thanks!

Pito
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Fish-users mailing list
Fish-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/fish-users



--
Glenn Jackman
Senior Software Developer

Pythian - Love your data

Tel: +1 613 565 8696 Ext. 1478
Mobile: +1 613 808 4984

--








--
Glenn Jackman
Senior Software Developer

Pythian - Love your data

Tel: +1 613 565 8696 Ext. 1478
Mobile: +1 613 808 4984

--



------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Pito Salas | 28 Jun 22:57 2016
Picon
Gravatar

About funced

I have atom configured as my $EDITOR

When I funced for example fish_prompt, it correctly launches atom but the edited function doesn’t seem
to stick. Any thoughts on what I might be doing incorrectly? Thanks!

Pito
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Fish-users mailing list
Fish-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users
Pito Salas | 28 Jun 03:20 2016
Picon
Gravatar

echo -ne?

Is there a way to get the equivalent behavior of echo -ne in Fish?

Here’s an example: 

echo -ne "\033];${PWD##*/}\007”

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Pito Salas | 28 Jun 00:25 2016
Picon
Gravatar

Newbie: overriding and using "built in functions" such as prompt_pwd and _fish_git_prompt

I’ve read and scanned the available doc pretty well and have some questions still. 

I discovered a large collection of “built in functions” in share/functions. If I want to change that
behavior what’s the best practice? Do I modify the ../share? I bet not. So what is recommended if for
example I want to have a variant of the default prompt.

And take a very fancy function like _fish_git_prompt. How do I get that to be invoked in .git directories?

Thanks!

Pito
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Fish-users mailing list
Fish-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users
Pito Salas | 27 Jun 23:33 2016
Picon
Gravatar

Newbie: Surprising command completion

When I type

new

Fish autocompletes with newalias (one word)

I am trying to figure out where that’s coming from but I can’t track it down. Help?


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users

Gmane