Axel Liljencrantz | 2 Nov 2007 01:00
Picon

Re: multiline question+macos X bug

Hi Piotr,

On 10/27/07, Piotr Lesnicki <piotr.lesnicki@...> wrote:
> hi,
>
> First of all, congrats: just discovered fish and i'm having fun trying it !!
>

Glad to hear it!

> A few questions and remarks:
>
> - I don't understand the multiline editing for things other than
> function/loops, eg :
>    ls \
>    -l
>   doesn't work as "ls -l" ?! An I need multiline for clearer scripts
>

This is how I personally expect things to work. I expect a backlashed
newline to be the same thing as a real newline except it doesn't cuase
the command to exit right now. But I may be in a minority, dunno. Most
shellscript languages seem to do what you expect, but e.g. CPP does
what I expect.

> - I think I have a bug on Macos X with macport fish 1.22.3 r{0,1} :
> "echo (seq 3)" or "for i in (seq 3)..."  will 'freeze' fish while in
> interactive mode (so in eval, but not with fish -c).  Sorry for not
> having looked at the code, but I saw that sources from darcs
> repository weren't compiling straightforwardly, I will try the iconv
(Continue reading)

Spug | 2 Nov 2007 01:10

Completing "vim ."

I'm not even sure if this is a fish problem, but here goes:

My tab completion works perfectly; "cd x<tab>" completes only directory  
names if there are any beginning with x, and all files instead if there  
aren't any, which I'm guessing is standard behaviour (it's nice, anyway).  
"cat x<tab>" completes all files and directories starting on x, which is  
great. "vim x<tab>", however, works just like "cd"; it completes only  
directory names starting with x if there are any (and doesn't complete  
regular files starting with x in that case). If there are no directories  
starting on x, it works fine and completes those.

Help, or a pointer? Thanks!

--

-- 
Spug

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Martin Bähr | 2 Nov 2007 01:13
Picon

completions (was: multiline question+macos X bug)

On Fri, Nov 02, 2007 at 01:00:58AM +0100, Axel Liljencrantz wrote:
> > - Fish help facilities are great ! One thing though: hypertext is
> > great, but I don't like it openned *by default* out of the term I'm
> > in, somewhere out there in a graphical browser...
> That's easy to fix! :-)
> set -U BROWSER links

that would change the default browser, ideally i'd prefer to set a browser
specifically for fish somewhere.

on debian systems there are also www-browser and x-www-browser links,
where www-browser points to a terminal application.

> >  2)<tab><tab> picking one from the proposed completions and rotates,
> > when I'm really lazy taping....
> I've though a lot about that. I definitly want some interface where
> you can pick one of the available completions, but I'm not really sure
> that is the right interface.

vi does that, and it's really annoying. without seeing the list, i can't
tell how often i need to hit tab to make it work, and even with seeing
the list, if you have lots of completions then you may have to hit tab
hundreds of times. or you have to go back and delete a few chars to get
to the point you need to continue.

maybe it's possible to show a suggestion without moving the cursor to
the end so that you can continue typing and simply ignore the
suggestion. like autocomplete in some applications.

speaking of completions, is it possible to make 
(Continue reading)

Martin Bähr | 2 Nov 2007 01:14
Picon

Re: Completing "vim ."

On Fri, Nov 02, 2007 at 01:10:24AM +0100, Spug wrote:
> "vim x<tab>", however, works just like "cd"; it completes only  
> directory names

i noticed that too. very odd.

greetings, martin.
--

-- 
cooperative communication with sTeam      -     caudium, pike, roxen and unix
offering: programming, training and administration   -  anywhere in the world
--
pike programmer   working in new zealand        open-steam.org|webhaven.co.nz
unix system-      bahai.or.at                        iaeste.(tuwien.ac|or).at
administrator     (caudium|gotpike).org                          is.schon.org
Martin Bähr       http://www.iaeste.or.at/~mbaehr/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
James Vega | 2 Nov 2007 01:21
Gravatar

Re: OT - Vim's completions (was: completions)

On Fri, Nov 02, 2007 at 01:13:22AM +0100, Martin Bähr wrote:
> On Fri, Nov 02, 2007 at 01:00:58AM +0100, Axel Liljencrantz wrote:
> > >  2)<tab><tab> picking one from the proposed completions and rotates,
> > > when I'm really lazy taping....
> > I've though a lot about that. I definitly want some interface where
> > you can pick one of the available completions, but I'm not really sure
> > that is the right interface.
> 
> vi does that, and it's really annoying. without seeing the list, i can't
> tell how often i need to hit tab to make it work, and even with seeing
> the list, if you have lots of completions then you may have to hit tab
> hundreds of times. or you have to go back and delete a few chars to get
> to the point you need to continue.

What you most likely want is to "set wildmode=longest:list".  This will
completely to the longest common substring of the matches AND display
the list of resulting matches.

James
--

-- 
GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan@...>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
(Continue reading)

Piotr Lesnicki | 5 Nov 2007 21:44
Picon

Re: multiline question+macos X bug

Hi again, and thanks for your answers !

> > - I don't understand the multiline editing for things other than
> > function/loops, eg :
> >    ls \
> >    -l
> >   doesn't work as "ls -l" ?! An I need multiline for clearer scripts
> >
>
> This is how I personally expect things to work. I expect a backlashed
> newline to be the same thing as a real newline except it doesn't cuase
> the command to exit right now. But I may be in a minority, dunno. Most
> shellscript languages seem to do what you expect, but e.g. CPP does
> what I expect.

So, what I was thinking about was something to put a command on
multiple lines not in an interactive shell, but in a script:

my_command_with_many arguments \
     argument_1 \
     argument_2 \ # a comment about this
     ...

> > - two things that I miss from my zsh config:
> >  1)the right prompt, i saw it's on your plans, that would be my top wish :)
>
> The current devel version of fish has something different with mostly
> the same advantages. If you are writing a command which becomes too
> long to fit on the line, the prompt will automatically move to a line
> of it's own, giving the shellscript code the entire screen width to
(Continue reading)

Abe Bachrach | 5 Nov 2007 01:54
Picon

is it possible to search the beginning of a a command like it matlab?

Hi all, first off I just started using fish, and so far like it a lot... I switched over looking for a shell that provided a search history like matlab, and at first was quite happy, however now that there are more entries in my search history, things aren't working so well, mainly because I need to type in more complete commands before I can start searching...

basically, is there a way to make the search only search the BEGINNING of a line???

for if I know that I have

>echo blah

10 lines up in my command history, in matlab (and what I'd really like to be able to do) I can just type e, and then hit the up arrow, and it will go to it. However now in fish, it will match any command that has an e in it, which isn't very useful.

this means that I have to type out several more letters, which is much slower.

so any way to fix this???

Simplest would just be an option to have searches start at the beginning of the string. Alternatively there could be a switch based on the number of characters entered, so if there are less than 2-3 characters entered, you would search the beginning of the line, and other do the regular search.

Let me know!
THanks,
-=Abe

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Chris Rebert | 6 Nov 2007 03:24
Picon

Re: is it possible to search the beginning of a a command like it matlab?

While I can see the advantage of the method you propose, consider an 
alternative situation.
Let's say I've just run the same command a bunch of times with different 
arguments, like this:

    foo --bar --qux -t somefile1
    foo --bar --qux -y somefile1
    foo --bar --qux -y somefile2

except a bunch more times with the same command and more argument 
variations.
Under your scheme, I'd type "foo" and then hit the up arrow a million 
times looking for the line I want, whereas in fish, I just have to 
remember one distinguishing *part* of the command, and it'll be 
completed by hitting the up arrow.

Just saying that there's a trade-off either way you make the up-arrow 
completion work.

- Chris Rebert

Abe Bachrach wrote:
> Hi all, first off I just started using fish, and so far like it a 
> lot... I switched over looking for a shell that provided a search 
> history like matlab, and at first was quite happy, however now that 
> there are more entries in my search history, things aren't working so 
> well, mainly because I need to type in more complete commands before I 
> can start searching...
>
> basically, is there a way to make the search only search the BEGINNING 
> of a line???
>
> for if I know that I have
>
> >echo blah
>
> 10 lines up in my command history, in matlab (and what I'd really like 
> to be able to do) I can just type e, and then hit the up arrow, and it 
> will go to it. However now in fish, it will match any command that has 
> an e in it, which isn't very useful.
>
> this means that I have to type out several more letters, which is much 
> slower.
>
> so any way to fix this???
>
> Simplest would just be an option to have searches start at the 
> beginning of the string. Alternatively there could be a switch based 
> on the number of characters entered, so if there are less than 2-3 
> characters entered, you would search the beginning of the line, and 
> other do the regular search.
>
> Let me know!
> THanks,
> -=Abe
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Fish-users mailing list
> Fish-users@...
> https://lists.sourceforge.net/lists/listinfo/fish-users
>   

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Martin Bähr | 6 Nov 2007 03:32
Picon

Re: is it possible to search the beginning of a a command like it matlab?

On Mon, Nov 05, 2007 at 06:24:27PM -0800, Chris Rebert wrote:
> Under your scheme, I'd type "foo" and then hit the up arrow a million 
> times looking for the line I want, whereas in fish, I just have to 
> remember one distinguishing *part* of the command, and it'll be 
> completed by hitting the up arrow.

what about making it search the beginning first and and if it fails to
find anything then look in the middle?
unlikely to have a command that starts with -y or a filename.

greetings, martin.
--

-- 
cooperative communication with sTeam      -     caudium, pike, roxen and unix
offering: programming, training and administration   -  anywhere in the world
--
pike programmer   working in new zealand        open-steam.org|webhaven.co.nz
unix system-      bahai.or.at                        iaeste.(tuwien.ac|or).at
administrator     (caudium|gotpike).org                          is.schon.org
Martin Bähr       http://www.iaeste.or.at/~mbaehr/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Gour | 6 Nov 2007 11:39
Picon
Gravatar

Re: Fancy new features - please test the new fish version before it is released

On Sun, 14 Oct 2007 17:09:41 +0200
"Axel Liljencrantz"
<liljencrantz@...> wrote:

Dear Axel,

it's my 1st post to the list and let me express my heartfelt "thank
you" for providing fish shell!

Since quite some time I'm doing simple taks to simplify my desktop
setup by using less, as well as more simple and powerful applications.

Soon, after moving to xmonad WM, I gave another try to fish and now
it's my 'default-shell' and I wrote live-pkgbuild to be able to
regularly pull from the repo (using beloved darcs :-)

> Case insensitive completion
> 
> The way this works is that if there are no case sensitive completions
> that match, case insensitive completions are usedas a fallback. If
> there is a case insensitive match, then the current argument is
> changed to match the case of the completion. All this happens
> automatically. There are situations where this is not ideal, but it
> seems to me to be the correct behaviour ~99 % of the time.
> Specifically, after using it for a long time, I have yet to have any
> realworld problems with it.

It works nicely for me...

> Multiline editing
> 
> When editing a multiline command, the up and down keys move up and
> down in the command. When at the top line, up performs a history
> search, and the same with down on the bottom line. This makes keyboard
> navigation far easier on long commands.

I must confess that before I started with fish, using bash was
'minimalistic', ie. although being comfortable with cli, I really never
tried to enter multiline-commands in the shell directly, but yesterday
I was fascinated how fish depends on other specific tool (like expr) to
do the job, keeping the shell simple and powerful at the same time.

Kudos for design!

> Long commands
> 
> When editing a very wide command, the prompt will jump to it's own
> line, so that you have the entire width of the screen at your disposal
> for editing your command.

I had to tryout this one as well, and it is very nice.

> Key bindings
> 
> Key bindings no longer use the inputrc file format. Instead, they are
> done using a simple fish builtiin command. There was never any real
> benefit from using the inputrc format, since the functions you could
> bind to in fish are different from those in readline. The new system
> makes it very easy to change the bindings interactively from the
> shell. To bind Control-p to the pwd command, write:
> 
> bind \cp pwd
> 
> To bind Alt-h to change home directory to your home directory, type
> 
> bind \eh cd
> 
> Note how the regular escape sequences already supported by the shell
> are reused to provide the same functionality here. That means that if
> you learn once how to use fish escape sequences, you can reuse the
> same knowledge in other places.

Didn't have need for the above, but it sounds cool.

> If anybody has the time to perform some extra testing of fish to
> report bugs, I'd be grateful. I hope to release the new fish version
> within a week or two.

So far, I did not encounter any bug although I was confused for some
time while my ssh-completion does not work, but the problem was solved
upon discovering that Arch package put HashKnownHosts option to 'yes' :-)

All the best in further enhancing our beloved (fish) shell ;)

Sincerely,
Gour

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

Gmane