Earlier quoted context omitted.
That's included, just the `~2` shortcut thing isn't.
Which is included? I couldn't find anything like "dirs -v" in the fish manual. Without that, "pushd +N" isn't very useful.
Fish shell 3.0
91–100 of 227 posts
Re: Fish shell 3.0
#92Something I've been thinking about this week as a vanilla bash user: Does Fish (or zsh, or others) have the ability to maintain some sort of a global command history? I often find myself wanting to run the same command in multiple terminals and currently just copy-paste.
Re: Fish shell 3.0
#93Let me know when it's posix compliant.
Re: Fish shell 3.0
#94Earlier quoted context omitted.
Forking off a subshell is very different, I would think, than forking and execing a new shell, both from a resource standpoint and an open file standpoint.
Not really from a usage perspective though, and resources often don't matter. If you're doing something like this in the background, then that usually means it takes a "long" time (or you'd just wait for it). So the overhead of starting an additional shell simply isn't important. Not that it's always irrelevant, but that's why the issues are still open.
But I do often do something like:
( cd somewhere ; do_something )
just so I can avoid having to do
pushd somewhere ; do_something ; popd
(or the equivalent).
Re: Fish shell 3.0
#95Earlier quoted context omitted.
What? That's been in for a few releases! To trigger it, enter a single-quote, then paste the URL, then close the quote once you're done. We don't attempt to detect URLs because that can go wrong, and because we don't know your intention. So we use the fact that you're inside single-quotes as the signifier that we should escape things - which also allows this to be used for e.g. pasting shellscript as a literal argume…
There must be a disconnect here, manually entering a single quote, then pasting my URL, then adding the closing quote is precisely what I wish to avoid. Here is a demonstration about what I'm talking about: https://i.imgur.com/d64lwaB.mp4 > "We don't attempt to detect URLs because that can go wrong, and because we don't know your intention." That much I've gathered from seeing this issue raised with fish people in th…
Okay. Now you can do it for http. What about ftp? Or "file://"? Do we detect _all_ kinds of URLs?
And even if we do, and we don't miss some or see something as a URL that isn't, what about _other_ kinds of things? What about shellscript? E.g. if I want to just execute a bash one-liner from the internet, I can do
`bash -c '`
and paste it and it'll work out. That won't be detected as a URL, because it isn't one.And I've seen a case of a URL with variables just yesterday (though I admit that's a coincidence):
https://docs.travis-ci.com/user/deployment/custom/ has "sftp://${SFTP_USER}:${SFTP_PASSWORD}@example.com/directory/filename". How do I paste that with the zsh thing? Do I need to go back and edit all of that?
So, instead, we have one rule: If you paste it insde single-quotes, it'll be escaped. If you paste it outside, it'll be inserted as-is (but still not executed). No matter what the contents, no matter where.
Re: Fish shell 3.0
#96Earlier quoted context omitted.
That’s new? Suddenly I feel less guilty about dodging coworkers who have been trying for years to get other people to try fish. But maybe now it’s getting closer to production readiness.
The fact that it doesn't support your particular preferred syntax doesn't mean it's not production-ready.
I think it's called POSIX.
Re: Fish shell 3.0
#97Earlier quoted context omitted.
The fact that it doesn't support your particular preferred syntax doesn't mean it's not production-ready.
> your particular preferred syntax I think it's called POSIX.
Re: Fish shell 3.0
#98Earlier quoted context omitted.
Your quoting is a bit confusing, as "`cmd...`" and "$(cmd...)" are similar,, while backtick-dollar-paranthesis is just asking for trouble... ;) I take it fish didn't / doesn't support either?
Fish just uses (cmd), no $.
Re: Fish shell 3.0
#99To install on ubuntu if you don't want to build: sudo apt-add-repository ppa:fish-shell/release-3 sudo apt-get update sudo apt-get install fish https://launchpad.net/~fish-shell/+archive/ubuntu/release-3
To install on Arch (w/yay), `yay -S fish`. (just a plug for how easy it is to install packages on Arch)
Re: Fish shell 3.0
#100Fish looks great, and I'm going to give it a try, but I ran into these same old shell scripting issues within 2 minutes of trying to configure my prompt, which is a bummer. Took me 10 minutes (I'm ashamed to say) to end up at `if test -n "$git_branch"` (double quotes are critical).
I'll be excited when someone invents a shell that feels natural in this respect. Perhaps the nature of shells and commands makes this impossible? Or are we just stuck in a box?