Re: [Fish-users] Equivalent of bash's $0?

2013-06-11 Thread Chris Wright
It's hacky, but you could read /proc/$PID/cmdline. It's a NUL-delimited file containing the entire commandline used to start the process. Then you can use readlink -f to find the absolute path. If the first element resolves to the path of fish, the second should resolve to the path of the script.

Re: [Fish-users] Equivalent of bash's $0?

2013-06-11 Thread Michael Stillwell
I can't seem to get $_ to output the name of the script. Sometimes it's blank, and sometimes ".". For example, "echo $_" in my ~/.config/fish/config.fish outputs a blank line. Some other experiments: $ echo $FISH_VERSION 2.0.0 $ cat foo.fish echo $_ $ fish foo.fish [blank line] $

[Fish-users] fish and rvm on lubuntu latest

2013-06-11 Thread Yvon Thoraval
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.XX) bash -c 'source ~/.rvm/scripts/rvm; rvm "$@"; status=$?; env > "$0"; e

Re: [Fish-users] Equivalent of bash's $0?

2013-06-11 Thread Alex Boisvert
Try $_ from http://fishshell.com/docs/2.0/index.html#variables On Tuesday, June 11, 2013, Michael Stillwell wrote: > 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?) > >

[Fish-users] Equivalent of bash's $0?

2013-06-11 Thread Michael Stillwell
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 W

[Fish-users] previous command completion bug (ubuntu)

2013-06-11 Thread Peter Flood
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

Re: [Fish-users] Virtualenvwrapper for fish

2013-06-11 Thread Peter Flood
Hi Dario It looks good, if it was around when I started using fish I definitely would have used it. When I moved to fish I made a custom workon script but got bored of updating it every time something changed or I had to customise it in a different environment. Eventually I gave up and now jus