Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 05:37
    mrgnw starred fish-shell/fish-shell
  • 04:28
    andrey-mishchenko edited #8533
  • 04:27
    andrey-mishchenko opened #8533
  • Dec 06 15:22
    alarsyo edited #8532
  • Dec 06 15:00
    alarsyo closed #8532
  • Dec 06 15:00
    alarsyo commented #8532
  • Dec 06 14:53
    alarsyo edited #8532
  • Dec 06 14:52
    alarsyo opened #8532
  • Dec 06 12:03
    lautarocastillo starred fish-shell/fish-shell
  • Dec 06 07:36
    liudonghua123 starred fish-shell/fish-shell
  • Dec 06 07:00
    wuliuqii starred fish-shell/fish-shell
  • Dec 06 05:58
    yifeikong commented #1916
  • Dec 06 05:43
    krobelus commented #1916
  • Dec 06 04:34
    floam labeled #8531
  • Dec 06 04:34
    floam demilestoned #8531
  • Dec 06 04:34
    floam unlabeled #8531
  • Dec 06 04:34
    floam closed #8531
  • Dec 06 04:34
    floam commented #8531
  • Dec 06 04:29
    floam milestoned #8531
  • Dec 06 04:29
    floam labeled #8531
Aaron Gyes
@floam
nice, another little bug with the thompson shell script implementation:
Screen Shot 2021-12-02 at 3.23.26 AM.png
Fabian Homborg
@faho
@floam Ah, okay. We need to absolutize the path.
Aaron Gyes
@floam
yeah.
Fabian Homborg
@faho
(if it's coming via $PATH)
Aaron Gyes
@floam
you're faster than me. I was scratchng my head for a while.
Fabian Homborg
@faho
Yeah it's executing sh -, not sh /usr/local/bin/-.
Aaron Gyes
@floam
I didn't realize /bin/sh - would work.
Fabian Homborg
@faho
It's stdin, I guess?
Aaron Gyes
@floam
/usr/local/bin/--version would be a clearer demonstration.
I think it's like, the same as doing /bin/sh +, and it's just not turning anything on or off
Fabian Homborg
@faho
Ah, we pass the argv[0] value for the command we tried to execute as the command to sh.
Aaron Gyes
@floam
I wasted a couple minutes thinking it was somehow related to the parser or us changing argv for login mode or something goofy since command -technically needs a tiny adjustment to deal with that valid command name. But we just need to resolve that path.
When it needs to be actual_cmd.
Aaron Gyes
@floam
in postfork too
Fabian Homborg
@faho
Yup
Probably fixable by simply overwriting it after, no need to be clever.
Aaron Gyes
@floam
uh..
what in the world. https://github.com/zsh-users/zsh/blob/master/Src/exec.c#L552 That comment, whole spot is quite similar to the same in our own code.. ๐Ÿคจ
oh, same contributor. I guess zsh also had a bug. phew.
Aaron Gyes
@floam
huh
@faho I guess I thought it was just dragonbsd and solaris or something with no seq, but you're totally right, no seq, just jot, with its extra features but and sufficently complicated to translate command argument positions that you wouldn't want to bother.
this is a... quite brave commit: att/ast#860
whence -q seq || alias seq=jot quite doomed
Felix
@felix:fachschaften.org
[m]
good evening (around here at least)
I'm looking for a way to "decorate" some commands with desktop notifications and sleep prevention while said command is running
so say I have a list of commands like ls, make and rbenv for example which I'd like to run caffeinate ls, caffeinate make and caffeinate rbenv, is there any better way than creating functions or binstubs for each of those?
Fabian Homborg
@faho
@felix:fachschaften.org Do you want a specific list of commands, or do you want notifications for long-running commands, or do you want to choose every time before you start it?
The done plugin does a bunch of heavy lifting here if it's about long-running commands.
1 reply
Felix
@felix:fachschaften.org
[m]
I want to have a fixed list of commands in my fish config which should exhibit the desired "enhanced" behaviour (in some cases prevent sleep with caffeinate, in some cases post a desktop notification, in some cases both)
Fabian Homborg
@faho
The desktop notification would be possible after the fact, so you could do it with a function triggered by the fish_postexec event. But running it with caffeinate isn't, so you'll have to make a wrapper function.
Felix
@felix:fachschaften.org
[m]
I guess I could use a similar scheme though and work my way through preexec and postexec events, and use pmset before and after the command accordingly instead of running the command "in" caffeinate, I had hoped to not have to take care of state myself ๐Ÿ˜€
Fabian Homborg
@faho
I don't think there's a way around that, sorry.
kaddkaka
@kaddkaka:matrix.org
[m]
Hi, are there any other installation notes for Ubuntu 21.10 impish? I downloaded the amd64.deb file from https://launchpad.net/~fish-shell/+archive/ubuntu/release-3/+packages but I fail when trying to install it:
 sudo apt install ./fish_3.3.1-1~hirsute_amd64.deb 
[sudo] password for david: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'fish' instead of './fish_3.3.1-1~hirsute_amd64.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 fish : Depends: fish-common (= 3.3.1-1~hirsute) but it is not going to be installed
        Recommends: xsel (>= 1.2.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
It talks about broken packages, but should I install some other packages manually?
Oh there are more. detailed instructions at https://launchpad.net/~fish-shell/+archive/ubuntu/release-3/ but it's not linked from the packages page
Fabian Homborg
@faho
@kaddkaka:matrix.org You want to add the actual repo instead of downloading the file
The fish-common package will be dropped for 3.4.0 - #7845, but until then you'll have to install it too. Which is why you should probably just add the actual PPA.
kaddkaka
@kaddkaka:matrix.org
[m]
Yeah I added the PPA, the problem was that were no instructions about that on the https://launchpad.net/~fish-shell/+archive/ubuntu/release-3/+packages (which is linked from homepage when clicking "download")
I have it working now, thanks! @faho :)
Emily Grace Seville
@EmilySeville7cfg

It is not clear for me when we have to start function names with:

  • one underscore
  • two underscores

Can somebody explain me? Does it mean "internal function"? If yes, what is internal in Fish context? There is no ability to hide functions from usage like methods in Python.

ridiculousfish
@ridiculousfish
@EmilySeville7cfg it's 100% ad-hoc. All functions share the same namespace, nobody has formalized underscores. Functions support interactive usage.
Emily Grace Seville
@EmilySeville7cfg
Maybe we can write some naming convention that is recommended but not required. Until functions can be unexported or moreover be local to some file it may help not to encounter naming collisions. ;) There is --path for complete - why not to create smth like this for functions? I mean to control where some function is accessible. For example to hide function from everywhere but not current directory. It will be more accurate than setting local attribute to functions and allow create smth like namespace but in a Fish way.๐Ÿค”
Zev Averbach
@zevav_twitter

hi fish people! i'm trying to make a permanent switch to fish-shell but i need your help in configuring away a nitpick:

to complete an 'autofill' it seems that i need to press right-arrow. ctrl-r and <tab> work too but not with a single keystroke.

how can i configure fish-shell to use, for example, ctrl-p or maybe ctrl-; to use fish's first autofill suggestion?

Johannes Altmanninger
@krobelus
@zevav_twitter ctrl-f does that by default (because it's readline for "right-arrow")
alternatively, use something like bind \cg accept-autosuggestion for ctrl-g
Zev Averbach
@zevav_twitter

@krobelus thank you so much! on second glance it's in the tutorial here https://fishshell.com/docs/current/tutorial.html#autosuggestions.

For my own education, though, what do you mean by "readline for 'right-arrow'"? A quick Google only got me here -- https://unix.stackexchange.com/a/364532/128049 -- but it's not super clear to me.

Johannes Altmanninger
@krobelus
@zevav_twitter "readline" is a library for interactive commandline programs and it defines the ctrl-f shortcut by default (with the same meaning as the right arrow). So I just meant that in readline-speak they are synonyms