Oh-my-fish: %self syntax deprecated in favor of $fish_pid

Created on 5 Apr 2018  Β·  7Comments  Β·  Source: oh-my-fish/oh-my-fish

The output:

install (line 140): function: Invalid process id %self
function on_exit -p %self
^
^ /dev/nullChecking for a sane environment...
 type: Could not find '^'
 type: Could not find '/dev/null'
 type: Could not find '^'

Then it keeps repeating the last two lines until I hit Ctrl-C.
My fish version is 2.7.1-1046-g36693341, I cloned from github and followed the instructions.
git version is 2.13.6, from the OpenSuse repositories.

fish-3.0 normal

Most helpful comment

Yes! v7 is on its way! πŸ˜²πŸ’πŸŸ We're just a few days from that. Please πŸ™ bear with us while we try to find some free time – which is heavily consumed by work 😊

All 7 comments

This is happening on OSX as well - with a HEAD based compile of fish.

fish, version 2.7.1-1070-ga9b582d2

My omf install died, so I'd tried reinstalling it and boom :(

Looks like process expansion was removed recently (which is... interesting): https://github.com/fish-shell/fish-shell/issues/4230

I'd say stick to version 2.7.1 for now, it is unclear from the issue if %self is going to be put back in or not. OMF doesn't promise compatibility with development builds of Fish, especially since sometimes they are wildly in flux.

It was put back, but just for backwards-compatibility. We should look into using the newer alternatives to %self syntax.

Hi!
Seeing as this is the last issue that is holding up the release of V7. I was wondering if there was anything that could be done to solve this?

Currently installing V6 of omf on Fish 3+ results in errors due to Fish deprecating ^ as a shortcut for stderr redirection. This was fixed in #609, but is was after V6 was released.

It would be nice to have V7 released soon. Looking through the issue queue I see a number of issues that seem to be related to this.

Today I had errors installing OMF on Fish version 3.1.0 related to the deprecation of ^ as a shortcut for stderr redirection.

$ ./install                                                                                                                    246ms ξ‚³ [Die Feb 25 17:34:08]
Checking for a sane environment...
Installing Oh My Fish to /home/username/.local/share/omf...
Using release channel "stable".
Cloning master from https://github.com/oh-my-fish/oh-my-fish.git...
Writing bootstrap to /home/username/.config/fish/conf.d/omf.fish...
Existent fish_prompt.fish found at /home/username/.config/fish/functions
↳ Moving to 
/home/username/.config/fish/functions/fish_prompt.1582648461.copy
Setting up Oh My Fish configuration...
Updating https://github.com/oh-my-fish/packages-main master... Done!
Installing package default
~/.local/share/omf/pkg/omf/functions/bundle/omf.bundle.add.fish (line 11): Expected a string, but instead found a '&'
    if not grep $record $bundle > /dev/null ^&1
                                             ^
from sourcing file ~/.local/share/omf/pkg/omf/functions/bundle/omf.bundle.add.fish
    called on line 1 of file ~/.local/share/omf/pkg/omf/functions/packages/omf.packages.install.fish
in command substitution
    called on line 53 of file ~/.local/share/omf/pkg/omf/functions/packages/omf.packages.install.fish
in function 'omf.packages.install' with arguments 'default'
    called on line 22 of file ~/.local/share/omf/pkg/omf/functions/bundle/omf.bundle.install.fish
in function 'omf.bundle.install'
    called on line 9 of file ~/.local/share/omf/pkg/omf/functions/cli/omf.cli.install.fish
in function 'omf.cli.install'
    called on line 2 of file -
in function '__omf_last_command'
    called on line 50 of file ~/.local/share/omf/pkg/omf/functions/omf.fish
in function 'omf' with arguments 'install'
source: Error while reading file β€œ/home/username/.local/share/omf/pkg/omf/functions/bundle/omf.bundle.add.fish”
fish: Unknown command: omf.bundle.add
~/.local/share/omf/pkg/omf/functions/packages/omf.packages.install.fish (line 53): 
    omf.bundle.add theme $name_or_url
    ^
in function 'omf.packages.install' with arguments 'default'
    called on line 22 of file ~/.local/share/omf/pkg/omf/functions/bundle/omf.bundle.install.fish
in function 'omf.bundle.install'
    called on line 9 of file ~/.local/share/omf/pkg/omf/functions/cli/omf.cli.install.fish
in function 'omf.cli.install'
    called on line 2 of file -
in function '__omf_last_command'
    called on line 50 of file ~/.local/share/omf/pkg/omf/functions/omf.fish
in function 'omf' with arguments 'install'
βœ” default successfully installed.
Installation successful!
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish

@sagebind If this issue #604 cannot not be resolved quickly and it is not of a critical nature, I would suggest moving it to V8 so that V7 can be released. Considering that V6 was released almost 2 1/2 years ago it time for a new release.

As of https://github.com/fish-shell/fish-shell/pull/5249 %self is supported, and seems like it'll be around ~forever:

I agree, I don't think we'll ever have the stomach to remove this, and it feels harmless to maintain it.

… So I'm going to close this one πŸ™‚

Now that this issue closed and there are no open issues for milestone v7, is there any word on if we can expect oh-my-fish version 7 to drop in the near future? :crossed_fingers:

Yes! v7 is on its way! πŸ˜²πŸ’πŸŸ We're just a few days from that. Please πŸ™ bear with us while we try to find some free time – which is heavily consumed by work 😊

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adrianObel picture adrianObel  Β·  6Comments

andrewrynhard picture andrewrynhard  Β·  7Comments

tiborsimon picture tiborsimon  Β·  6Comments

98thpixel picture 98thpixel  Β·  7Comments

kaelumania picture kaelumania  Β·  6Comments