<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.shells.fish.user">
    <title>gmane.comp.shells.fish.user</title>
    <link>http://blog.gmane.org/gmane.comp.shells.fish.user</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.fish.user/1958"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.fish.user/1957"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.fish.user/1956"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.fish.user/1955"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.fish.user/1954"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.fish.user/1953"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.fish.user/1952"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.fish.user/1951"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.fish.user/1950"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.fish.user/1949"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.fish.user/1948"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.fish.user/1947"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.fish.user/1946"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.fish.user/1945"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.fish.user/1944"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.fish.user/1943"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.fish.user/1942"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.fish.user/1941"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.fish.user/1940"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.shells.fish.user/1939"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.fish.user/1958">
    <title>Re: open command in other shells</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.fish.user/1958</link>
    <description>
that's a little pessimistic... first example, put this in a 
file 'open' in front of your PATH

#!/usr/bin/env fish
open "$argv"


another script 'open':

#!/bin/sh
if which xdg-open &gt; /dev/null
then
   xdg-open "$&lt; at &gt;"
else
   mimedb -l -- "$&lt; at &gt;"
fi

-Isaac

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Isaac Dupree</dc:creator>
    <dc:date>2008-09-06T13:31:47</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.fish.user/1957">
    <title>fish maintenance status</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.fish.user/1957</link>
    <description>Hi all,

fish is completely still since many months, no additions/fixes have
been done since February IIRC, and Axel, the main author and
maintainer is apparently missing from the list.

So I'd like to know which is the maintenance status of fish, if there
is someone currently involved in its development and if the apparent
stall where it currently seems to be is due to some temporary reason.

I like fish so much, it is a terrific usability improvement compared
to bash and other similar shells, and I think it would be very sad to
see it die for undermaintenance.

Unfortunately I can't dedicate myself to its development, but I'd like
to contribute completions for many of the commands I use everyday.

Friendly regards.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Stefano Sabatini</dc:creator>
    <dc:date>2008-09-06T08:33:11</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.fish.user/1956">
    <title>Re: open command in other shells</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.fish.user/1956</link>
    <description>You can't. The open command is a fish function:
/usr/share/fish/functions/open.fish

But all it does is invoking xdg-open or mimedb -l.

So you could write something like this in your bashrc to get the same
thing:

  if which xdg-open &gt; /dev/null
  then
      alias open=xdg-open
  else
      alias open='mimedb -l --'
  fi


On Tue, Sep 02, 2008 at 04:11:58AM -0700, Good Bad wrote:

</description>
    <dc:creator>Henry Precheur</dc:creator>
    <dc:date>2008-09-05T20:25:37</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.fish.user/1955">
    <title>Completions for effectv</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.fish.user/1955</link>
    <description>Hi fishes,

attached completion file for effectv.

BTW I'm realizing that one of the problem with completions is that
they depend on the version of the program.

Ideally fish completions should be installed with every program
itself, but this is rather unrealistic.

A solution would be to detect somehov (parsing
--version/-V/-version/-v?) the version number of the program and then
eventually to report a warning.

Regards.
# completions for effectv 0.3.9 or similiar

complete -c effectv -f -a "QuarkTV" -d "Dissolves moving objects"
complete -c effectv -f -a "FireTV" -d "Clips incoming objects and burns it"
complete -c effectv -f -a "BurningTV" -d "Burns incoming objects"
complete -c effectv -f -a "RadioacTV" -d "Brightens moving objects and blurs it"
complete -c effectv -f -a "StreakTV" -d "Makes 8 afterimages"
complete -c effectv -f -a "BaltanTV" -d "Makes afterimages longer"
complete -c effectv -f -a "1DTV" -d "Grabs a horizontal line from video every 1/30 sec"
complete -c effectv -f -a "DotTV" -d "Converts the picture into a set of dots"
complete -c effectv -f -a "MosaicTV" -d "Censors incoming objects"
complete -c effectv -f -a "PuzzleTV" -d "Scrambles the picture"
complete -c effectv -f -a "PredatorTV" -d "Makes incoming objects invisible visibly"
complete -c effectv -f -a "SpiralTV" -d "Spiraling effect"
complete -c effectv -f -a "SimuraTV" -d "Color distortion and image mirroring"
complete -c effectv -f -a "EdgeTV" -d "Detects edge and display it like good old computer way"
complete -c effectv -f -a "ShagadelicTV" -d "Go back to swinging '60s"
complete -c effectv -f -a "NoiseTV" -d "Makes incoming objects noisy"
complete -c effectv -f -a "AgingTV" -d "Film-aging effect"
complete -c effectv -f -a "LifeTV" -d "Conway's life game with video input interaction"
complete -c effectv -f -a "TransFormTV" -d "Performs positional translations on images"
complete -c effectv -f -a "SparkTV" -d "Spark effect"
complete -c effectv -f -a "warpTV" -d "Goo'ing effect"
complete -c effectv -f -a "HolographicTV" -d "Holographic vision seen in Star Wars"
complete -c effectv -f -a "cycleTV" -d "Color cycling effect"
complete -c effectv -f -a "RippleTV" -d "Ripple mark effect"
complete -c effectv -f -a "DiceTV" -d "A 'dicing' effect"
complete -c effectv -f -a "VertigoTV" -d "Alpha blending with zoomed and rotated images"
complete -c effectv -f -a "DeinterlaceTV" -d "Deinterlacing video images"
complete -c effectv -f -a "nervousTV" -d "Realtime frame shuffling effect"
complete -c effectv -f -a "RndmTV" -d "Gives you a noisy picture in color or B/W"
complete -c effectv -f -a "RevTV" -d "Waveform monitor effect"
complete -c effectv -f -a "RandomDotStereoTV" -d "Makes random dot stereo stream from video input"
complete -c effectv -f -a "LensTV" -d "Old school demo lens effect"
complete -c effectv -f -a "DiffTV" -d "Hilights interframe differences"
complete -c effectv -f -a "BrokenTV" -d "Simulates broken TV"
complete -c effectv -f -a "WarholTV" -d "Hommage to Andy Warhol"
complete -c effectv -f -a "MatrixTV" -d "A Matrix like effect"
complete -c effectv -f -a "PUPTV" -d "Comes from \"Partial UPdate\", certain part of image is updated at a frame"
complete -c effectv -f -a "ChameleonTV" -d "Vanishing into the wall..."

complete -c effectv -o help -d "show usage information"
complete -c effectv -o device -r -d "[FILE] use device FILE for video4linux (default is /dev/video0)"
complete -c effectv -o channel -r -d "[CHANNEL] channel number of video source (default is 0)"

set __fish_effectv_norms "ntsc
pal
secam
pal-nc
pal-m
pal-n
ntsc-jp"
complete -c effectv -o norm -x -a '(echo $__fish_effectv_norms)' -d "[NORM] set video norm (default is ntsc)"

set __fish_effectv_freqs "argentina
australia
australia-optus
canada-cable
china-bcast
europe-east
europe-west
france
ireland
italy
japan-bcast
japan-cable
newzealand
southafrica
us-bcast
us-cable
us-cable-hrc"
complete -c effectv -o freqtab -x -a '(echo $__fish_effectv_freqs)' -d "[FREQUTAB] set frequency table"

complete -c effectv -o fullscreen -d "enable fullscreen mode"
complete -c effectv -o hardware -d "use direct video memory (if possible)"
complete -c effectv -o doublebuffer -d "enable double buffering mode (if possible)"
complete -c effectv -o fps -d "show frames/sec"
complete -c effectv -o size -x -a "WxH" -d "[WxH] set the size of capturing image to WxH pixels (default 320x240)"
complete -c effectv -o geometry -x -a "WxH" -d "[WxH] set the size of screen to WxH pixels"
complete -c effectv -o scale -x -d "[NUMBER] set the scaling. When the capturing size is set, the screen size is scaled by NUMBER"
complete -c effectv -o autoplay -x -d "[FRAMES] change effects automatically every FRAMES"

set __fish_effectv_palettes "grey
rgb24
rgb555
rgb565
yuv410p
yuv411p
yuv420p
yuv422
yuv422p"
complete -c effectv -o palette -x -a '(echo $__fish_effectv_palettes)' -d "[PALETTE] set the PALETTE of capturing device"

complete -c effectv -o vloopback -r -d "[FILE] use device FILE for output of vloopback device"
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/_______________________________________________
Fish-users mailing list
Fish-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&lt; at &gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/fish-users
</description>
    <dc:creator>Stefano Sabatini</dc:creator>
    <dc:date>2008-09-04T22:21:11</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.fish.user/1954">
    <title>open command in other shells</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.fish.user/1954</link>
    <description>how can i use fish's open command in other shells such as bash?


      


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Good Bad</dc:creator>
    <dc:date>2008-09-02T11:11:58</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.fish.user/1953">
    <title>Re: something identical to bash's !$</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.fish.user/1953</link>
    <description>Expanded explanation:

History substitution was invented before interactive line editing.
Good interactive history recall is more convenient but requires a
small change of habits - if you want to modify an old line/word, first
recall it, then edit.  E.g. don't type "sudo !!" - first press Up,
then Home, then type "sudo ".

Fish history recall is very simple yet effective:

* As in any modern shell, the Up arrow recalls whole lines, starting
from the last line executed.  A single press replaces "!!", later
presses replace "!-3" and the like.

  + If the line you want is far back in the history, type any part of
the line and then press Up one or more times.  This will constrain the
recall to lines that include this text, and you will get to the line
you want much faster.  This replaces "!vi", "!?bar.c" and the like.

* Alt+Up recalls individual arguments, starting from the last argument
in the last line executed.  A single press replaces "!$", later
presses replace "!!:4" and the like.

  + If the argument you want is far back in history (e.g. 2 lines back
- that's a lot of words!), type any part of it and then press Alt+Up.
This will show only arguments containing that part and you will get
what you want much faster.  Try it out, this is very convenient!

If you want to reuse several arguments from the same line ("!!:3*" and
the like), consider recalling the whole line and removing what you
don't need (Alt+D and Alt+Backspace are your friends).

http://fishshell.org/user_doc/index.html#editor

</description>
    <dc:creator>Beni Cherniavsky</dc:creator>
    <dc:date>2008-08-30T23:57:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.fish.user/1952">
    <title>Re: something identical to bash's !$</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.fish.user/1952</link>
    <description>Press Alt+UpArrow repeatedly until you get the word you need in the buffer.

On Sat, Aug 30, 2008 at 3:43 AM, Alex Greif &lt;alex.greif-Re5JQEeQqe8AvxtiuMwx3w&lt; at &gt;public.gmane.org&gt; wrote:

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Philip Ganchev</dc:creator>
    <dc:date>2008-08-30T22:29:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.fish.user/1951">
    <title>something identical to bash's !$</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.fish.user/1951</link>
    <description>Hi,
I am completely new to fish and missing the good old history  
abbreviations lile !$
Is there a way to simulate this behavior?

Thanks in advance,
Alex.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Alex Greif</dc:creator>
    <dc:date>2008-08-30T07:43:10</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.fish.user/1950">
    <title>Problem with getopt</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.fish.user/1950</link>
    <description>Greetings fish-users mailling list!


I just started using Fish on Ubuntu and really like it. I am slowly
leaving my old love ZSH.

I am trying to make fish work on OpenBSD and would eventually make a port
of fish for OpenBSD. But I just ran into a problem regarding getopt(1).

Fish assumes that the GNU version of getopt(1) is present. This version
comes with several extra-"features". Including long-options as
documented here:

http://www.rt.com/man/getopt.1.html

The problem is that most *BSD stick to 'classic' version of getopt(1)
without adding extra features:

http://www.freebsd.org/cgi/man.cgi?query=getopt
http://www.openbsd.org/cgi-bin/man.cgi?query=getopt
http://netbsd.gw.com/cgi-bin/man-cgi?getopt

These versions treat all options as options to be parsed and do not
support long-options parsing. Which means every time fish uses a
GNU/getopt options I get something like this:

  getopt: unknown option -- Q
  getopt: unknown option -- o


I guess that removing -Q from fish scripts  is not a problem even though
I don't understand what it does, thanks to the 'clear' explanation in
the manual:

  -Q, --quiet-output
      Do not generate normal output. Errors are still reported by
      getopt(3), unless you also use -q.

The long-options removal should not be a problem technically, since it
is possible to replace them with short options. The only problem is that
short-options are not as nice and explicit as long-options.


I can provide a patch, but I would like to be sure of what I am doing
before doing anything ;-)

  Cheers,

</description>
    <dc:creator>Henry Precheur</dc:creator>
    <dc:date>2008-08-26T03:57:52</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.fish.user/1949">
    <title>Bug report: problem with creating alias</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.fish.user/1949</link>
    <description>-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/_______________________________________________
Fish-users mailing list
Fish-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&lt; at &gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/fish-users
</description>
    <dc:creator>Ovchinnikov George</dc:creator>
    <dc:date>2008-08-24T10:10:29</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.fish.user/1948">
    <title>Cannot use it as the default shell on Mac OS X</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.fish.user/1948</link>
    <description>A friend seems to have been able to set fish as his default shell, but  
I can't. When I try, this is what happens:

fish: Could not return shell to foreground
tcsetpgrp: Value too large to be stored in data type
fish: Could not return shell to foreground
tcsetpgrp: Value too large to be stored in data type
fish: Could not return shell to foreground
tcsetpgrp: Value too large to be stored in data type
fish: Could not return shell to foreground
tcsetpgrp: Value too large to be stored in data type
fish: Could not return shell to foreground
tcsetpgrp: Invalid argument
fish: Could not return shell to foreground
tcsetpgrp: Invalid argument
fish: Could not return shell to foreground
tcsetpgrp: Invalid argument
fish: Could not return shell to foreground
tcsetpgrp: Invalid argument
fish: Could not return shell to foreground
tcsetpgrp: Invalid argument
fish: Could not return shell to foreground
tcsetpgrp: Invalid argument
fish: Could not return shell to foreground
tcsetpgrp: Invalid argument
fish: Could not return shell to foreground
tcsetpgrp: Invalid argument
fish: Could not return shell to foreground
tcsetpgrp: Invalid argument
fish: Could not return shell to foreground
tcsetpgrp: Invalid argument
fish: Could not return shell to foreground
tcsetpgrp: Invalid argument
fish: Could not return shell to foreground
tcsetpgrp: Invalid argument
fish: Could not return shell to foreground
tcsetpgrp: Invalid argument
fish: Could not return shell to foreground
tcsetpgrp: Invalid argument
fish: Could not return shell to foreground
tcsetpgrp: Invalid argument
fish: Could not return shell to foreground
tcsetpgrp: Invalid argument
fish: Could not return shell to foreground
tcsetpgrp: Invalid argument
fish: Could not return shell to foreground
tcsetpgrp: Invalid argument
fish: Could not return shell to foreground
tcsetpgrp: Invalid argument
fish: Could not return shell to foreground
tcsetpgrp: Invalid argument
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish


And then no prompt. Any suggestions?

-bd

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Brian Donovan</dc:creator>
    <dc:date>2008-08-21T02:44:13</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.fish.user/1947">
    <title>Re: Problem with sudo and Fish functions</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.fish.user/1947</link>
    <description>FYI: Extending the root's path does not work. It seems that the scripts have to be installed elsewhere, e.g. under "/usr/bin". 

Guido van Steen 


      

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>gvsteen-/E1597aS9LQAvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2008-08-16T01:21:59</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.fish.user/1946">
    <title>Re: Problem with sudo and Fish</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.fish.user/1946</link>
    <description>Sorry to answer my own question: 

I just did: 

me&lt; at &gt;my-laptop ~&gt; whereis agi 
agi: /usr/bin/agi
me&lt; at &gt;my-laptop ~&gt; whereis agr
agr:

Aparently I created an agi script under "/usr/bin/". I had forgotten about it. Anyway, that is why Fish finds it. There is no "/usr/bin/agr" script under "/usr/bin/", so Fish does not find it. 

Apparently Bash and Sudo understand each other better, and so Bash looks for scripts under "/home/me/bin/" as well, and it finds "/usr/bin/agr" there. 

So when I combine Fish and Sudo, the alias2 scripts have to be located somewhere on root's "$PATH", which in my case has so far excluded "/home/me/bin". 

Guido van Steen 



      

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>gvsteen-/E1597aS9LQAvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2008-08-16T00:57:36</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.fish.user/1945">
    <title>Weird result with Sudo and Fish</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.fish.user/1945</link>
    <description>Dear Fish users, 

Meanwhile I have been Fishing happily. I polished my (un)alias2 scripts a bit and things seemed to work all right. 

However, I just finished the following session: 

me&lt; at &gt;mylaptop ~&gt; which agi
/home/me/bin/agi
me&lt; at &gt;mylaptop ~&gt; which agr
/home/me/bin/agr
me&lt; at &gt;mylaptop ~&gt; cat /home/me/bin/agi
#!/bin/bash 

#This file was created by alias2. Do not edit it. It may be overwritten automatically.

apt-get install "$&lt; at &gt;"
me&lt; at &gt;mylaptop ~&gt; cat /home/me/bin/agr
#!/bin/bash 

#This file was created by alias2. Do not edit it. It may be overwritten automatically.

apt-get remove "$&lt; at &gt;"
me&lt; at &gt;mylaptop ~&gt; ll ./bin/ag*
-rwx------ 1 me me 124 2008-08-15 03:39 ./bin/agi*
-rwx------ 1 me me 123 2008-08-16 01:15 ./bin/agr*
me&lt; at &gt;mylaptop ~&gt; sudo agi fish
Reading package lists... Done
Building dependency tree       
Reading state information... Done
fish is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
me&lt; at &gt;mylaptop ~&gt; sudo agr fish
sudo: agr: command not found

That final result really surprised me!

When I tried the last 2 commands under Bash, I got the expected (and desired) results: 

me&lt; at &gt;my-laptop:~$ sudo agi fish
Reading package lists... Done
Building dependency tree       
Reading state information... Done
fish is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
me&lt; at &gt;mylaptop:~$ sudo agr fish
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  fish
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 3498kB disk space will be freed.
Do you want to continue [Y/n]? n
Abort.

So, the combination of Fish and Sudo still puzzles me. Can other Fish users reproduce this behavior, or is it something that I alone experience?

Thanks in advance!  

Guido van Steen 



      

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>gvsteen-/E1597aS9LQAvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2008-08-16T00:16:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.fish.user/1944">
    <title>Re: Problem with sudo and Fish functions</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.fish.user/1944</link>
    <description>This may be of interest too: http://w00tbl0g.blogspot.com/2007/05/using-bash-functions-under-sudo.html

Would such a "wrapper function around sudo" also be possible in Fish? 

Guido van Steen 


      

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>gvsteen-/E1597aS9LQAvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2008-08-11T22:27:11</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.fish.user/1943">
    <title>Re: Problem with sudo and Fish functions</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.fish.user/1943</link>
    <description>I am sorry about the indention problem, which crippled the Python scripts. 




      -------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/_______________________________________________
Fish-users mailing list
Fish-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&lt; at &gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/fish-users
</description>
    <dc:creator>gvsteen-/E1597aS9LQAvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2008-08-09T01:44:47</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.fish.user/1942">
    <title>Re: Problem with sudo and Fish functions</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.fish.user/1942</link>
    <description>Dear Fish users, 

For those who are interested, the following Python scripts implement the commands "alias2" and "unalias2". They may be saved as "/usr/bin/alias2" and "/usr/bin/unalias2", although saving them anywhere else on $PATH will do as well. The scripts have not been optimized. They have not been tested either. So, use them at your own risk. 

Best wishes, 

Guido van Steen 

"""#!/usr/bin/env python 

# save this script as "/usr/bin/alias2" and make it executable 

import os 
import sys 

id_string = "#This file was created by alias2. Do not edit it. It may be overwritten automatically."
config_file = ".config/alias2/alias2.config" 

home = os.getenv("HOME")
path = os.getenv("PATH")
if home + "/bin" not in path: 
print "alias2: \"" + home + "/bin\" required to be in the $PATH environment variable "  
sys.exit(2)
alias_cmd = "" 
for i in range(len(sys.argv)): 
if i != 0: 
alias_cmd = alias_cmd + sys.argv[i] + " "
alias = alias_cmd.split("=")[0].strip()
try: 
aliased = alias_cmd.split("=")[1].strip()
except IndexError: 
## to be done later: 
# if (len(sys.argv) == 2):
#print_the_contents_of_alias2_config()
# if (len(sys.argv) == 3): 
#if sys.argv[3] == "-a"
#print_the_contents_of_alias2_config()
print "alias2: no equal sign in \"alias2 " + alias_cmd.strip() + "\"."
sys.exit(2)
if not alias.replace("-","").isalnum(): 
print "alias2: \"" + alias + "\" contains one or more awkward characters "   
sys.exit(2) 
if alias.split(" ")[0] != alias: 
print "alias2: " + alias + " cannot be alias2ed." 
sys.exit(2)
if os.path.exists(home + "/bin/" + alias): 
fhr = open(home + "/bin/" + alias, "r")
contents = fhr.read() 
fhr.close() 
if not id_string in contents: 
print "alias2: " + home + "/bin/" + alias + " exists. Remove it manually. "
sys.exit(2)
fhw = open(home + "/bin/" + alias, "w") 
fhw.write("#!/bin/bash \n\n")
fhw.write(id_string + "\n\n")
fhw.write(aliased + ' "$&lt; at &gt;"' + " \n")
fhw.close() 
os.system("chmod +x " + home + "/bin/" + alias)
print "alias2: " + alias + " created as an alias2 script" 
if not os.path.exists(home + "/" + os.path.dirname(config_file)): 
dir_list = os.path.dirname(config_file).split("/") 
dir_processed = home  
for i in dir_list: 
dir_processed = dir_processed + "/" + i 
try: 
os.mkdir(dir_processed)
except OSError: 
pass 
try: 
fhr = open(home + "/" + config_file, "r")
contents = fhr.read()
fhr.close() 
except IOError: 
contents = "" 
line_by_line = contents.split("\n")
already_registered = 0 
for i in line_by_line: 
if alias == i: 
already_registered = 1 
if not already_registered: 
fhw = open(home + "/" + config_file, "w") 
fhw.write(contents + alias + "\n")
fhw.close()
"""

"""#!/usr/bin/env python 

# save this script as "/usr/bin/unalias2" and make it executable 

import os 
import sys 

dir_name = os.path.dirname(__file__)

fhr = open(dir_name + "/alias2")
contents = fhr.read()
id_string = contents.split("id_string")[1].split('"')[1].split('"')[0]
config_file = contents.split("config_file")[1].split('"')[1].split('"')[0]
fhr.close()

home = os.getenv("HOME")

if (len(sys.argv) != 2) : 
print "unalias2: provide one argument exactly" 
sys.exit(2)
to_be_unaliased = sys.argv[1]
if os.path.exists(home + "/bin/" + to_be_unaliased): 
fhr = open(home + "/bin/" + to_be_unaliased, "r")
contents = fhr.read() 
fhr.close() 
if not id_string in contents: 
print "unalias2: " + home + "/bin/" + to_be_unaliased + " was not created by alias2. Remove it manually"
sys.exit(2)
else: 
os.remove(home + "/bin/" + to_be_unaliased) 
print "unalias2: " + home + "/bin/" + to_be_unaliased + " removed"
else: 
print "unalias2: " + home + "/bin/" + to_be_unaliased + " does not exist"
sys.exit(2)
fhr = open(home + "/" + config_file , "r")
contents = fhr.read().replace(to_be_unaliased + "\n","")
fhr.close() 
fhw = open(home + "/" + config_file, "w") 
fhw.write(contents)
fhw.close() 
"""

--- On Thu, 8/7/08, Isaac Dupree &lt;isaacdupree-xwVYE8SWAR3R7s880joybQ&lt; at &gt;public.gmane.org&gt; wrote:



      

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>gvsteen-/E1597aS9LQAvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2008-08-09T01:30:08</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.fish.user/1941">
    <title>Question about vi-mode</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.fish.user/1941</link>
    <description>-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/_______________________________________________
Fish-users mailing list
Fish-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&lt; at &gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/fish-users
</description>
    <dc:creator>Markus Banfi</dc:creator>
    <dc:date>2008-08-08T10:38:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.fish.user/1940">
    <title>Re: Problem with sudo and Fish functions</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.fish.user/1940</link>
    <description>It works flawlessly. Might be a nice add-on package. 

Thanks! 

Guido van Steen 

--- On Thu, 8/7/08, Isaac Dupree &lt;isaacdupree-xwVYE8SWAR3R7s880joybQ&lt; at &gt;public.gmane.org&gt; wrote:



      

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>gvsteen-/E1597aS9LQAvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2008-08-07T14:38:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.fish.user/1939">
    <title>Re: Problem with sudo and Fish functions</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.fish.user/1939</link>
    <description>Hi Isaac, 

Thank you for your explanation. I had though of creating some /usr/bin/ scripts too. I may even define some kind of /usr/bin/my_alias script to create the other scripts. That is much nicer than to depend on creating "unfriendly" Fish functions.  

Best wishes, 

Guido 

--- On Thu, 8/7/08, Isaac Dupree &lt;isaacdupree-xwVYE8SWAR3R7s880joybQ&lt; at &gt;public.gmane.org&gt; wrote:



      

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>gvsteen-/E1597aS9LQAvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2008-08-07T14:14:14</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.shells.fish.user/1938">
    <title>Re: Problem with sudo and Fish functions</title>
    <link>http://permalink.gmane.org/gmane.comp.shells.fish.user/1938</link>
    <description>Hi Martin, 

Thank you very much for your quick answer. I set up Fish using sudo in an interactive bash session. I actually issued the command "sudo agi fish". In my ~/.bashrc file agi is defined as a simple Bash alias. I have not defined it anywhere else. It works though. 

I do not know much about technicallities. I did not even know that sudo calls bash. I guess that this means that it will be difficult to make sudo understand that I actually want to feed it a Fish function. To me it seems that this makes it quite difficult to use Fish and sudo together. 

Could I write a Fish function called "sudo"? I could detect if the next argument is agi and then expand it as "apt-get install" and add the rest of the command line to it. 

This morning I tried something like that. My first attempt failed though, and so I decided to ask if there were no easier solutions. 

Best wishes, 

Guido 

--- On Thu, 8/7/08, Martin Bähr &lt;mbaehr-J82dVEKiPgVsIEQYbtjsvCEcasqEdqbRs2V0tQ3P5b8&lt; at &gt;public.gmane.org&gt; wrote:



      

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>gvsteen-/E1597aS9LQAvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2008-08-07T14:03:57</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.shells.fish.user">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.shells.fish.user</link>
  </textinput>
</rdf:RDF>
