Concours Edwin | 22 Aug 18:10 2014
Picon

Cross compiling fish for iOS?

Hello!

I've recently jailbroken my iOS device and found that there wasn't a lot of shell available. Sadly, fish
isn't in those available shells. So I wondered : Is there a way to cross compile Fish for iOS? Does anyone
here achieved it?

The architecture is armv7, but I think there are much more parameters than architecture for cross compiling.

I'm pretty new to cross compilation stuff. So if someone could enlighten me on which tools should be used for
this, I'll be really glad.

Regards
Robin Carlier
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
Rickard von Essen | 20 Aug 15:54 2014
Picon

Re: Command substitution and functions

What is strange is that 
$ echo "http://"(vip)
outputs only a new line. I would expect it to at least printout:
http://

// Rickard


On Wed, Aug 20, 2014 at 3:27 PM, Stestagg <stestagg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
My guess would be something to do with how stdout is being captured/ssh/vagrant weirdness

It might be worth trying adding -T or -t to the ssh command to force/unforce ssh from using pty allocation




On Wed, Aug 20, 2014 at 2:19 PM, Rickard von Essen <rickard.von.essen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi,

It turns out that is the function creating the url that is not working as I expected. This is the actual code:

function vip
  vagrant ssh $argv[1] -c "ifconfig eth1 | sed -ne 's/.*inet addr:\(\S*\)\s*Bcast.*/\1/p'" \
    ^ /dev/null
end

Using it gives:
$ vip
192.168.233.170

But running:
$ open "http://"(vip)
Usage: open [-e] [-t] [-f] [-W] ...

Any ideas?

// Rickard


On Wed, Aug 20, 2014 at 2:19 PM, Cedric Auger <sedrikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Works perfectly for me:
-----------------------------
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
cauger <at> cauger-PNR ~> function url
                           echo "some url"
                     end
cauger <at> cauger-PNR ~> open (url)/index.html
xdg-open: file 'some url/index.html' does not exist
cauger <at> cauger-PNR ~>
----------------------------
Have you tried to run it in some interactive shell, in a script or somewhere else?



2014-08-20 13:14 GMT+02:00 Rickard von Essen <rickard.von.essen <at> gmail.com>:
Hi,

If i have a function that computes an URL, say:

function url
  echo "some url"
end

Then I want to use it in a command substitution. Something like:

open (url)/index.html

but (url) is expanded to empty string. How should I do this?

Regards
Rickard von Essen


------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Fish-users mailing list
Fish-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/fish-users




--
.../Sedrikov\...


------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Fish-users mailing list
Fish-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/fish-users



------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Rickard von Essen | 20 Aug 13:14 2014
Picon

Command substitution and functions

Hi,

If i have a function that computes an URL, say:

function url
  echo "some url"
end

Then I want to use it in a command substitution. Something like:

open (url)/index.html

but (url) is expanded to empty string. How should I do this?

Regards
Rickard von Essen

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Martín Cigorraga | 19 Aug 03:01 2014
Picon

Trouble parsing file name with switch

Hi,
I'm trying to adapt a bash function to extract compressed files depending on the tool used to compress them:

function ex                                                                                                 
         # ex - archive extractor                                                                           
         # usage: ex <file>                                                                                 
         if test -f $1                                                                                      
            switch $1                                                                                       
                   case *.tar.bz2                                                                           
                        tar xjfv $1                                                                         
                   case *.tar.gz                                                                            
                        tar xzfv $1                                                                         
                   case *.bz2                                                                               
                        bunzip2 $1                                                                          
                   case *.rar                                                                               
                        unrar x $1                                                                          
                   case *.gz                                                                                
                        gunzip $1                                                                           
                   case *.tar                                                                               
                        tar xfv $1                                                                          
                   case *.tbz2                                                                              
                        tar xjfv $1                                                                         
                   case *.tgz                                                                               
                        tar xzfv $1                                                                         
                   case *.xz                                                                                
                        xz -dv $1                                                                           
                   case *.zip                                                                               
                        unzip $1                                                                            
                   case *.Z                                                                                 
                        uncompress $1                                                                       
                   case *.7z                                                                                
                        7z x $1                                                                             
                   case '*'                                                                                 
                        echo "'$1' cannot be extracted via ex()"                                            
            end                                                                                             
         else                                                                                               
            echo "'$1' is not a valid file"                                                                 
         end                                                                                                
end  

Of course this isn't working at this time so my question is: how do I do to make switch correctly parse the file name?

Best regards,
-Martin
------------------------------------------------------------------------------
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Gour | 16 Aug 14:23 2014
Picon

prompt with support for Fossil DVCS

Hello,

at the moment I use powerline-shell
(https://github.com/milkbikis/powerline-shell) which provides powerline-like
prompt for Bash, ZSH and Fish shells.

I'd like to simplify my setup by getting rid of that Python dep, so wonder if
there is some Fish/Fossil user who created the powerline-like fish prompt with
support for Fossil DVCS?

Sincerely,
Gour

--

-- 
Abandoning all attachment to the results of his activities, 
ever satisfied and independent, he performs no fruitive action, 
although engaged in all kinds of undertakings.

------------------------------------------------------------------------------
charlie | 4 Aug 19:33 2014
Picon

Re: Fishshell custom autocompletition

Any developers care to chime in on this ?


On Fri, Aug 1, 2014 at 11:43 AM, charlie <charlie.fats-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

I'm actually just a user I haven't looked at the code, I'll take a look though.

On Jul 31, 2014 11:29 AM, "Fedor Belov" <fedor.belov <at> mail.ru> wrote:
Great! Can you tell me any way to implement it? Any docs links / API / etc.  Just I'm new to fishshell

Thank you


Wed, 30 Jul 2014 21:34:50 -0500 от charlie <charlie.fats-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:

I love this idea, I'll help if I can.


Hi

I wanna implement shell program with very specific autocompletition logic:

user can type: 'myApp f.s<tab>' and shell should display him following suggestions

fish-shell
fish.shell.config
...

After that user can select which argument he wants to use. Enter -> program receives appropriate argument 

General idea - instead of typing whole argument, type only its part and chose argument from suggestions (based on some rules - split request/suggestions into words (fish.shell.config splits into [fish, shell, config], f.s - [f,s]), match words)

One more example to explain you idea:

I've got folder /home/fbelov/docs/
I wanna type `cd h.f.d` (or my custom_cd) and get suggestion /home/fbelov/docs/ . Select suggestion, enter -> folder is changed to /home/fbelov/docs/

Is it possible to implement? Can you suggest me docs to read?

Thank you!

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/fish-users



С уважением,
Белов Федор



--
Thanks!
Charlie
512-698-2009
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Fedor Belov | 30 Jul 14:18 2014
Picon

Fishshell custom autocompletition

Hi

I wanna implement shell program with very specific autocompletition logic:

user can type: 'myApp f.s<tab>' and shell should display him following suggestions

fish-shell
fish.shell.config
...

After that user can select which argument he wants to use. Enter -> program receives appropriate argument 

General idea - instead of typing whole argument, type only its part and chose argument from suggestions (based on some rules - split request/suggestions into words (fish.shell.config splits into [fish, shell, config], f.s - [f,s]), match words)

One more example to explain you idea:

I've got folder /home/fbelov/docs/
I wanna type `cd h.f.d` (or my custom_cd) and get suggestion /home/fbelov/docs/ . Select suggestion, enter -> folder is changed to /home/fbelov/docs/

Is it possible to implement? Can you suggest me docs to read?

Thank you!
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Walter Dolce | 29 Jul 10:17 2014
Picon

Bug report + backtrace

Please find attached the backtrace from Fish.

----
Backtrace:
0   fish                                0x0000000100004f1e fish + 20254
1   fish                                0x0000000100045757 fish + 284503
2   fish                                0x000000010002dc37 fish + 187447
3   fish                                0x000000010005c440 fish + 377920
4   fish                                0x000000010005c7de fish + 378846
5   fish                                0x000000010005c4ce fish + 378062
6   fish                                0x000000010005c8f5 fish + 379125
7   fish                                0x000000010005c57f fish + 378239
8   fish                                0x000000010002f037 fish + 192567
9   fish                                0x0000000100031163 fish + 201059
10  fish                                0x00000001000455b2 fish + 284082
11  fish                                0x0000000100045867 fish + 284775
12  fish                                0x0000000100032e28 fish + 208424
13  fish                                0x0000000100034cc6 fish + 216262
14  fish                                0x0000000100033ed0 fish + 212688
15  fish                                0x0000000100042dd4 fish + 273876
16  fish                                0x0000000100044c1e fish + 281630
17  fish                                0x0000000100045295 fish + 283285
18  fish                                0x0000000100045867 fish + 284775
19  fish                                0x00000001000329a8 fish + 207272
20  fish                                0x0000000100031829 fish + 202793
21  fish                                0x000000010004566e fish + 284270
22  fish                                0x0000000100045867 fish + 284775
23  fish                                0x000000010005190e fish + 334094
24  fish                                0x000000010001f882 fish + 129154
25  fish                                0x0000000100016c14 fish + 93204
26  fish                                0x0000000100031752 fish + 202578
27  fish                                0x00000001000455b2 fish + 284082
28  fish                                0x0000000100045867 fish + 284775
29  fish                                0x0000000100060055 fish + 393301
30  fish                                0x000000010005f7e6 fish + 391142
31  fish                                0x0000000100000994 fish + 2452
----

--

walter dolce | developer
twitter  <at> walterdolce
skype walter.dolce
tel +39 (0) 327 597 9830

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Ryan Burnett | 29 Jul 17:20 2014
Picon

Swap right arrow and tab functionality

I'm running OS 10.9.4 with Fish 2.1. I launch Terminal and cd into my sites folder, which has a few directories with similar names, for example: 
  • angular-json
  • angular-mongo
When I type:

$ cd a

Fish auto suggests:

$ cd angular-json

...when I hit tab it auto completes "angular" but stops at the dash.

However, if I delete that line, type "cd a" again, Fish again auto suggests angular-json. Hitting the right arrow and enter takes me to the angular-json directory (which is what I prefer).

My question is, is it possible to swap this right arrow key auto complete functionality to tab and vice versa?
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Jan-Thorsten Peter | 10 Jul 08:27 2014
Picon
Picon

Setting up a per directory history

Hi,
I'm trying to setup a per directory history by saving each command executed in a directory to a local file. It come down to add a line like this:
   echo (date +%F.%H-%M-%S) $history[1] >> .history.$USER
to the fish_prompt function. The problem is that $history[1] does not contain the current command, but the previous.
So if the previous command was "echo FOO" and the current command is "echo BAR" it would save "echo FOO" to the history file instead of "echo BAR".
Is there a way to get the current command?
Beside is it also possible to execute a function like this before the actual command is executed and not like the fish_prompt function after the command already finished?
Any other way to saving the current command to a file in the current directory?

P.S.: I'm just giving fish a try coming from zsh. So far really impressive! It gives me a shell that behaves the way I like it with a lot less configuration effort. Thanks a lot for your work!
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Michael Stillwell | 9 Jul 12:49 2014

Idiomatic default values for functions

Does fish have a short equivalent to bash's "use default values" (i.e.
${parameter:-word})? I'd like to use this to provide default values to
functions without having to write out laborious if ... else ... end
chains.

Michael

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft

Gmane