13 ms·
Hey all, one of the fish devs here. It's awesome to see all of the comments and happy users. We are in the process of scoping a major release (fish 3.0) that c
by ridiculous_fish 9y ago
Hey all, one of the fish devs here. It's awesome to see all of the comments and happy users.
We are in the process of scoping a major release (fish 3.0) that can include major syntactic changes. If there's an aspect of fish you would like to see changed, now is a great time! Of course we'll read the comments here, and our issues page [1] is where discussion happens.
We're also welcoming new contributors. It's easy to get started writing completions or with the issues labelled "easy-pick". The core code base is reasonably modern C++ too.
http://github.com/fish-shell/fish-shell/issues/ http://github.com/fish-shell/fish-shell/issues/
- deleted 9y ago[deleted]
- techdragon 9y agoI see that https://github.com/fish-shell/fish-shell/issues/3341 https://github.com/fish-shell/fish-shell/issues/3341 is scheduled for 3.0. This is also marked as the fix for the broken/invalid YAML format that is used for storing the shell history https://github.com/fish-shell/fish-shell/issues/2258 https://github.com/fish-shell/fish-shell/issues/2258 I implore you to NOT use JSON or ProtocolBuffers, neither are appropriate formats for configuring my shell, or storing long sets of textual data. Protocol Buffers is hardly the kind of format I want to parse and read my history in, and JSON is a less than ideal configuration format for many reasons. https://github.com/vstakhov/libucl https://github.com/vstakhov/libucl UCL (Universal Configuration Language) is a much more appropriate format for configuring programs than JSON, and is has been accepted as standard for use configuring all tools included in the FreeBSD operating system. I also suggest you consider using a different language to store shell history, since shell history and shell configuration are two very different jobs with different goals and trade offs. I personally would suggest a simple safe format like TOML https://github.com/toml-lang/toml https://github.com/toml-lang/toml for storing the history. But If you do want a single format for both configuration and history, I would implore you to pick TOML not JSON or Protocol Buffers.
- ridiculous_fish 9y agoThanks for writing that up, I linked to it from the issue. FWIW I agree with you that shell history should be a simple format, and even ad-hoc parseable via Unix tools. zsh uses simple : and ; delimiters. JSON is more complex, and binary formats like protobuf are way out.
- __sr__ 9y agoOut of the mainstream formats, JSON is among the easiest to parse - thanks to the CLI tool jq. Does UCL have something equivalent? Protobuf (or any other binary format) has the benefit of being faster to load, but I agree - it should not be be used to store things like history. It should be easy to parse history without having to write code. And with Protobuf, you need the schema. If a binary format is going to be used, it should be optional - or perhaps there should be tools to convert the history file to/from a plaintext format.
- jhoechtl 9y agoWould like to see comments in configuration, Json doesn't support comments.
- deleted 9y ago[deleted]
- techdragon 9y agoThere is uclcmd [https://github.com/allanjude/uclcmd https://github.com/allanjude/uclcmd] which could do with some more work but was created with the intent of being a UCL equivalent of JQ. Also since he’s the kind of person that a HN reader will probably Ike to know more about. The original author of the aforementioned uclcmd, Allan Jude [http://twitter.com/allanjude http://twitter.com/allanjude], is the former host of the TechSNAP podcast [http://www.jupiterbroadcasting.com/show/techsnap/ http://www.jupiterbroadcasting.com/show/techsnap/], current host of the BSD Now podcast [http://www.jupiterbroadcasting.com/show/bsdnow/ http://www.jupiterbroadcasting.com/show/bsdnow/], a current member of the FreeBSD Core team, and co-authored not one but two books on the ZFS file system FreeBSD Mastery: ZFS [https://www.amazon.com/FreeBSD-Mastery-ZFS-7/dp/0692452354/ https://www.amazon.com/FreeBSD-Mastery-ZFS-7/dp/0692452354/] and FreeBSD Mastery: Advanced ZFS [https://www.amazon.com/FreeBSD-Mastery-Advanced-ZFS/dp/0692688684/ https://www.amazon.com/FreeBSD-Mastery-Advanced-ZFS/dp/06926...]
- sridca 9y agoWhat sort of syntactic changes?
- faho 9y agoHi, another fish dev here! We're open to a lot of things (except "make it fully POSIX-compatible"). We're still trying to not massively break everything, though. The sort of things we've discussed include: - Not expanding `{}` so you don't need to quote it with e.g. `find -exec {}` (currently this is read as a zero-element brace expansion, i.e. it expands to no argument) - Removing the `?` single-character glob because it's apparently entirely unused and is another special character to remember (in fact we've also talked about removing `^` as a shorthand for redirecting stderr and `%something` process expansion) - Allowing `$(command)` command substitutions, which could be used inside quotes as well (long term, these would replace our current `(command)` style) - Possibly removing the special handling we have for $PATH, $CDPATH and $MANPATH (these are treated by fish as lists, which is nice in some ways and causes pain in others) For a general overview, see [the fish 3.0 milestone on github](https://github.com/fish-shell/fish-shell/milestone/18 https://github.com/fish-shell/fish-shell/milestone/18).
- mixmastamyk 9y agoNo thanks, am happy with the shell as is.
- amjith 9y agoFish shell's design doc [0] was a huge inspiration in the design of pgcli [1] and mycli [2]. Thank you for leading the charge on modern command line design. [0] https://fishshell.com/docs/current/design.html https://fishshell.com/docs/current/design.html [1] https://www.pgcli.com https://www.pgcli.com [2] https://www.mycli.net https://www.mycli.net
- ridiculous_fish 9y agoCredit where credit is due, nearly all of the design doc was written by Axel Liljencrantz, the author of fish 1.x.
- versteegen 9y agoDoes this mean... the link between the name and your nick is a coincidence? Thanks for both your work on fish and for your blog!
- Crontab 9y agoI am learning Postgresl for the fun of it and I hadn’t heard of pgcli before. Thanks for mentioning it.
- romatthe 9y agopgcli was a huge help to some former colleagues who had some trouble working with relational databases and SQL for the first time. I'm a big fan myself as well. Thank you for building a great piece of software.
- tapsboy 9y agoAvid fish user since last 3 years. On feature I miss from bash is the `sudo !` to re-run previous command as sudo. Last time I checked fish didn't offer an equivalent. Either that or something similar will be useful
- V-eHGsd_ 9y ago!! and !$ are the two miss most. but similarly, fish user for the last 2+ years.
- erk__ 9y agoWith !$ you can use Alt+. to write the arguments from the last command.
- cben 9y agoAlt+. is a bash (libreadline really) key. In fish Alt+Up does something similar, but repeated presses iterates over all words of all commands rather than last words of bash commands. A big improvement is you can type some chars first and then Alt+Up only gets words matching this substring — like Up but word granularity! (Closest bash key is Ctrl+Alt+I) If you don't mind the differences, and want Alt+. muscle memory to work in fish too, do: bind \e. history-token-search-backward (plus Alt+Up doesn't work for me in linux console, Alt+. does)
- sry_not4sale 9y agoI missed it too, so I created a fish function: ``` function sudo if test "$argv" = !! eval command sudo $history[1] else command sudo $argv end end ``` This works for `sudo !!` https://github.com/srynot4sale/dotfiles/blob/master/fish/functions/sudo.fish https://github.com/srynot4sale/dotfiles/blob/master/fish/fun...
- mixmastamyk 9y agoI use up, ctrl-a, then type "sudo ".
- 9y ago
- no_wizard 9y agoIf there is anything I would personally like to see it’s the bass plugin rolled into the shell itself to make transitions for bash and some esoteric edge cases easier to handle https://github.com/edc/bass https://github.com/edc/bass Maybe adopt a package manager for plugins too? ;)
- clintcparker 9y agoRegarding the package manager, you should check out https://github.com/fisherman/fisherman https://github.com/fisherman/fisherman
- ideasman42 9y agoWhile I like fish, I stopped using it because of a small convenience feature ZSH has. With ZSH, I can run a command with a space at the start so it's excluded from history, even though its not saved to disk, the last command is still stored in memory so I can press Up to access it again. This is handy when a mistake is made in the command means I need to run it again with some small change.
- zanchey 9y agoA large number of electrons have been expended on this topic - see https://github.com/fish-shell/fish-shell/issues/4327 https://github.com/fish-shell/fish-shell/issues/4327 for a starting point. It doesn't seem there's a perfect answer here.
- pacoverdi 9y agoThis feature seems to exist also in bash. I discovered it accidentally while wondering why my history did not include my last commands (copy/pasted with a leading space).
- bgaluszka 9y agoAFAIK it's not stored in history but also you can't go "up" and run it again which is what parent wants.
- ideasman42 9y agoRight, only the last command is kept in memory. Run another command and it's lost (which is good IMHO)
- Aardwolf 9y agoHeh I have the opposite preference, I use space to ensure when pressing up it will not bring up that command, to not mistakingly run it when muscle memory will expect another command there (for mv and rm commands mostly)
- mivanchev 9y agoHey, thank you for contributing to one of my favorite pieces of software :) The Fish shell is my primary choice, because it's so intuitive and easy to use. I never encountered a situation where the Fish shell behaved contrary to my expectations. I do wish there was a native Windows version, because that's where I spend 50% of my digital time, but only because it's so great.
- zaphirplane 9y agoI tried fish and it seemed ok, I didn’t continue with it cause I needed to rewrite all my aliases and functions (work related not at home). From memory one was && vs “and” which we use a lot to chain commands. Something like implementing &&/|| would go a long way, compat command sub, closing if statements . I know it seems like a small thing to modify your aliases/functions but I would basically need to modify mine and be a maintainer for the shared ones. TLDR adddition transitionally compat with bash or zsh
- nie 9y agoI would love to see zsh navigation tools[0] be integrated in fish. There is a long standing issue in fish which is the support for CTRL-R history, while many are pondering on the UI of it. I would like to see znt's UI be adopted (not saying it's perfect, but quite a good starting point for user conversion). [0] https://github.com/psprint/zsh-navigation-tools https://github.com/psprint/zsh-navigation-tools
- yoz-y 9y agoI have switched to fzf for Ctrl-R history which does seem kind of similar.
- jhasse 9y agoCopy and pasted from another reply: "I still wish fish support && and ||, if only for the times when I copy and paste some one-liner off of stack overflow and have to rewrite it." That and support for SOME_ENV_VAR=foo ./bar (not having to prepend "env ") are what's stopping me from recommending fish to others. Btw: Big thank you for fish, it's awesome!
- mattgreenrocks 9y agoYes please, even if we have to opt in to this behavior with a patronizing env var :)
- nonsince 9y agoI really like that you have to use `env` in fish, since it's cross-shell - it works in bash/zsh/dash/whatever. The `A=b foo` syntax is an unnecessary appendix in the syntax that complicates matters while only saving 4 characters.
- jhasse 9y agoI agree and think the best fix would be if the syntax would be forbidden in bash/zsh. Problem is: Millions of code snippets on the Internet not using env.
- nine_k 9y agoFor one-liners, typing `env ` before pasting is likely not too much work. For longer scripts, you'd have to rewrite much of the text anyway.
- jhasse 9y agooften there's stuff like cd build && LD_LIBRARY_PATH=../lib ./foo :/ It's no dealbreaker though, I still use fish and love it :) Just a minor annoyance ;)
- vram22 9y agoThat syntax is from very early days of sh itself (predecessor of bash), IIRC. So removing it would break many scripts, as sibling comment by jhasse said.
- dgsb 9y agoIs there any planned work on the vi-mode command line edition ? This is the sole missing feature which make me miss bash from time to time.
- zanchey 9y agoVi mode has been implemented since 2.2.0 (July 2015), although it's an ongoing work in progress - if there's something missing then we'd consider adding it (although nobody's going to reimplement Vim in fish - sometimes Alt-E is your best option).
- dgsb 9y agoSure, but the current implementation has several bugs and could be refined, some motion command does not move where is expected (ie e b e b combos)
- ufo 9y agoI'm very glad to see that getting rid of the magic path variable semantics is a possibility for 3.0 :) Other than that, my biggest pain point with fish now is that it doesn't interact well with pkg-config (issue #982) and the workarounds for that are a bit awkward. eval is scary and may require double-quoting the non-pkg-config parameters, and string splitting can wrongly split inside quoted text.
- jdlyga 9y ago&& is a major one. Also !! for sudo !!
- eu 9y agoCare to explain what this does? Thanks
- pta2002 9y ago!! is the last command, so sudo !! will run the last command as root. e.g. apt install foo # you need root permissions to install, won't work sudo !! # will expand to sudo apt install foo, and it'll work!
- udp 9y agoIt would be great if Fish supported &&. I know it has its own syntax for this but it's not particularly fun going through a command you copy pasted from elsewhere and swapping out all the &&s (I usually just end up firing up bash).
- roryokane 9y agoFish's FAQ already explains why it doesn't use `!!` – it says that editing commands from history by pressing the up arrow is more memorable and flexible. I don't find it a problem to type “up Ctrl-A sudo” instead of “sudo !!”.
- paule89 9y agothe main feature i use fish for is the syntax expansion, and history usage of it. The biggest gripe i have with it is the specific syntax. If fish would act more like a bash shell in case of syntax. ( i know i would need a totally different shell). But it could replace the fish for me in an instant. everywhere. Anyways. Thanks for the fish.
- eugene_pirogov 9y agoTwo things I personally eager to see: 1. equivalent of `set +x` and `set +e` from bash (to echo commands and stop script execution on the first non-zero return) – https://github.com/fish-shell/fish-shell/issues/3427 https://github.com/fish-shell/fish-shell/issues/3427, 2. Associative arrays – https://github.com/fish-shell/fish-shell/issues/390 https://github.com/fish-shell/fish-shell/issues/390
- threatofrain 9y agoWhat are some things to look forward to for Fish 3.0?
- k3a 9y agoThanks for it! I am also using Fish happily for interactive terminal work. Not so much for scripting as I am lazy to learn the new syntax. What I don't like is that after hitting Tab twice when doing path completion, the list of possibilities comes out, allowing arrow keys to be used for selection. The problem is that it requires pressing Enter to confirm the suggestion and I fear of executing the command with incomplete path prematurely (it's just one more Enter hit away).