Ilya Kulakov | 17 Jun 2013 12:12
Picon
Gravatar

Excessive file completion

Hi

Whenever I try to complete file or dir names, fish prints suggestions which include part of the path I've already entered.
E.g. when I'm trying to complete /Applications/, fish suggests "…ications/Safari.app/"
Is it possible to configure fish to exclude "…ications/" from suggestions completely?


Best Regards,
Ilya Kulakov

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
aurelien coillet | 17 Jun 2013 10:22
Picon

Suffix pattern removing

Hi, 

How can I perform suffix removal as this (bash) command:

nameis=${dataset%.*}

if dataset is a filename with extension (say foo.txt), nameis will only contain "foo". 
Is there a way to do that with fish?

Thanks,

--
Aurélien Coillet
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Robert O'Connell | 16 Jun 2013 19:49
Picon

Fish version of [[?

I want to compare a string with a wildcard, as in "[[ $1 == *.tar.gz ]]"
How can I match strings with wildcards?
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Siteshwar Vashisht | 16 Jun 2013 17:03
Picon

Re: Fedora package

Thanks Laurence. If you need a spec file for creating RPM packages, you can get it from repository at https://build.opensuse.org/package/show?package=fish-shell&project=home%3Asiteshwar

 

 

On Sunday 16 Jun 2013 3:51:17 PM L McGlashan wrote:

Hi,

I'd like to package fish in Fedora. I got in touch with one of the previous maintainers (Oliver Falk) of fish in fedora and he's ok with that. Just thought I'd pass this through the fish mailing list before I go ahead.

Regards,

Laurence McGlashan



--

Regards,

Siteshwar Vashisht

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
L McGlashan | 16 Jun 2013 16:51
Picon

Fedora package

Hi,

I'd like to package fish in Fedora. I got in touch with one of the previous maintainers (Oliver Falk) of fish in fedora and he's ok with that. Just thought I'd pass this through the fish mailing list before I go ahead.

Regards,

Laurence McGlashan
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Mario Signorino | 15 Jun 2013 21:55

Working on a new terminal emulator

Hi all,

I'm working on this: https://vimeo.com/68400623
It's still a prototype but maybe... it could work.

I started from bash.. then I moved to zsh.. now I've just discovered
fish... so I want to integrate it in xpipe.
I just take a quick look at the docs... but it's a big stuff and
probably it will require more time and attention. So far I didn't find
what I'm looking for. So I came here to say hello and ask some basic
question not found there...
1) Completion: is it possible to wrap the completion output inside
some escape codes? Each entry. I use some custom escape codes to catch
any completion output  and display it in the graphical way... In zsh I
add also some useful info as PWD and the complete line buffer. My
escape code is \033|(whatever). It's not used in the vt100 standard...
Also it would be perfect to know (in case of file completion) the
exact type of any voice: file, directory, executable. At the end of
this email I will add an example of what I have done in zsh.
2) preexec: again, in zsh there is a preexec() function called just
after the execution of any command... and before any output. What I
need is to prepare the "next line" of my terminal to handle the result
of the command: so I need to know if the user has run git, apt, wget
or whatever. How?

Example...

mario <at> squit $ ls /home/me[TAB PRESS]
\033|.1 "ls /home/me", $PWD and some other info \033|.2
\033|./Dropbox (directory)   \033|.2
\033|./script.sh (executable)   \033|.2
\033|./file.txt (standar dfile)   \033|.2

mario <at> squit $ wget http://www.xxx.com/bigfile[ENTER PRESS]
\033|.3 "wget http://www.xxx.com/bigfile", $PWD and some other info \033|.2
...the output of wget...

Tnx
Mario

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
Tony Wang | 15 Jun 2013 17:04
Picon
Gravatar

Proper behavior on very long prompt?

Hi,

I’ve noticed that if the prompt is very long,
(longer than the window width), it’ll become
a single ‘>’, and it even won’t show a second
line.

What’s the consideration behind it?
I don’t think it’s friendly to users.
I tried to google, but found nothing.

Is there any configuration to change that?
Or, can I check if it happens, so I can try to
show something abbreviated instead?

Thanks! :)

-- 
BR,
Tony Wang

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Fish-users mailing list
Fish-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users
Yvon Thoraval | 11 Jun 2013 17:09
Picon

fish and rvm on lubuntu latest

I've installed rvm.fish :
yt at GERICOM in ~                                                                                                   
↪ cat .config/fish/functions/rvm.fish 
function rvm -d 'Ruby enVironment Manager'
  # run RVM and capture the resulting environment
  set -l env_file (mktemp -t rvm.fish.XXXXXXXXXX)
  bash -c 'source ~/.rvm/scripts/rvm; rvm "$ <at> "; status=$?; env > "$0"; exit $status' $env_file $argv

  # apply rvm_* and *PATH variables from the captured environment
  and eval (grep '^rvm\|^[^=]*PATH\|^GEM_HOME' $env_file | grep -v '_clr=' | sed '/^[^=]*PATH/y/:/ /; s/^/set -xg /; s/=/ /; s/$/ ;/; s/(//; s/)//')
  # clean up
  rm -f $env_file
end


however doing a "rvm get stable --auto", i get a lot of errors :
fish: Nom de commande illégal 'get_usage()'
/tmp/9303 (ligne 6): get_usage()
                     ^
fish: Nom de commande illégal '{'
/tmp/9303 (ligne 7): {
                     ^
fish: Nom de commande illégal '}'
/tmp/9303 (ligne 9): }
                     ^
fish: Nom de commande illégal 'get_latest()'
/tmp/9303 (ligne 15): get_latest()
                      ^
fish: Nom de commande illégal '{'
/tmp/9303 (ligne 16): {


may be it's not rvm.fish in user but rather the function rvm in "~/.rvm/bin/rvm"

yt at GERICOM in ~                                                                                                   
↪ which rvm
/home/yt/.rvm/bin/rvm


yt at GERICOM in ~                                                                                                   
↪ cat /home/yt/.rvm/bin/rvm
#!/usr/bin/env bash

if (( ${rvm_ignore_rvmrc:=0} == 0 ))
then
  declare rvmrc
  for rvmrc in /etc/rvmrc "$HOME/.rvmrc"
  do
    if [[ -f "$rvmrc" ]]
    then
      if grep '^\s*rvm .*$' "$rvmrc" >/dev/null 2>&1
      then
        printf "%b" "
  Error:
    $rvmrc is for rvm settings only.
    rvm CLI may NOT be called from within $rvmrc.
    Skipping the loading of $rvmrc
"
        exit 1
      else
        source "$rvmrc"
      fi
    fi
  done
  unset rvmrc
fi

export rvm_path
if [[ -z "${rvm_path:-}" ]]
then
  if (( UID == 0 )) && [[ -d "/usr/local/rvm" ]]
  then rvm_path="/usr/local/rvm"
  elif [[ -d "${HOME}/.rvm" ]]
  then rvm_path="${HOME}/.rvm"
  elif [[ -d "/usr/local/rvm" ]]
  then rvm_path="/usr/local/rvm"
  else echo "Can't find rvm install!" 1>&2 ; exit 1
  fi
fi

# allow disabling check temporary
: rvm_is_not_a_shell_function:${rvm_is_not_a_shell_function:=1}

# if to prevent fork-bomb
if source "${rvm_scripts_path:="$rvm_path/scripts"}/rvm"
then
  rvm "$ <at> "
else
  echo "Error sourcing RVM!"  1>&2
  exit 1
fi
yt at GERICOM in ~                                                                                                   
↪ 


the file "/usr/local/rvm" doesn't exist on my lubuntu system.


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Michael Stillwell | 11 Jun 2013 16:21
Favicon
Gravatar

Equivalent of bash's $0?

Is there a fish equivalent of $0 (the full pathname of the running
script)?  (Or indeed any way to determine what directory a script is
in, from within the script itself?)

Michael

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
Peter Flood | 11 Jun 2013 12:21

previous command completion bug (ubuntu)

I've just noticed some odd behaviour around previous command completion 
on Ubuntu 12.04 with the apt-get fish package (2.0.0).

When the greyed our part of the command makes the command longer that 
the available space the greyed out part shows '...', and when the typed 
part of the command is too long the the command is pushed down a line 
however the greyed out part of the command doesn't show at all. These 
problems only happen when the line is not long enough

http://dl.dropbox.com/u/45079992/Screenshots/y500ba1ui~q5.png 
<http://dl.dropbox.com/u/45079992/Screenshots/y500ba1ui%7Eq5.png>
line long enough, expected behaviour

http://dl.dropbox.com/u/45079992/Screenshots/jzd4w23oy1d8.png
enough room for typed chars ('fin') but not enough room for greyed out 
part, it shows ... and doesn't move down to next line

http://dl.dropbox.com/u/45079992/Screenshots/v45_x0v642_5.png
then when there's not enough room for the typed part of the command it 
does drop down to the next line but doesn't show the greyed out part at all

http://dl.dropbox.com/u/45079992/Screenshots/hq1~dicecd6c.png 
<http://dl.dropbox.com/u/45079992/Screenshots/hq1%7Edicecd6c.png>
after pressing ctrl+f the command is completed so that works, it's just 
not showing what the completion would be

http://dl.dropbox.com/u/45079992/Screenshots/oqhw127gvn_s.png
screenshot from my mac (1.23.1, an old fishfish version) which shows the 
expected behaviour (note there is enough room for the typed chars ('fi') 
on the previous line however the command is pushed down to the next line 
because there's not enough room for the greyed out part

Has anyone seen this behaviour before? Should I create an issue on github?

Peter

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
Sindre Devik | 9 Jun 2013 20:07
Picon

bug in git-prompt

Good evening

Using the git prompt available through fish_config, I never received any prompt. This was in a git dir where I was not on any branch. Switching to branch master fixed the issue.

Cheers, Sindre
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users

Gmane