this post was submitted on 21 Jul 2023
36 points (97.4% liked)

Linux

48254 readers
446 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Hi. So I've been a fish user for a while, but I've always gotten frustrated with it not being POSIX compliant. I tried to use zsh with oh-my-zsh to still benefit from fish's capabilities on zsh, but I had 2 problems with it: it was incredibly slow, and it wasn't as good. As I recently found out, the plugins can just be sourced in zsh directly, skipping oh-my-zsh, and fixing my speed issues. But the second issue remained: zsh-autosuggestions is just not as good as fish's autocompletion feature, which suggests commands in a user's PATH, as well as autocompletes directories, without me having ever accessed them, meaning they weren't even in the history at that point, which allowed me to hit the ground running. I want that with zsh as well. Is there a plugin or something like that, which allows for these extra features, and can autosuggest commands from PATH and autocomplete directories? I really want to switch to a POSIX shell, but the lack of this feature would make it feel like quite a downgrade. Thanks.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 7 points 1 year ago (5 children)

you should be able to reconfigure the plugin, I have it set to pull from history first and after that look for standard command completion using the following:

ZSH_AUTOSUGGEST_STRATEGY=(history completion)

important is that you put this BEFORE sourcing the plugin.

the github should carry more information on how to configure this plugin.

PS: I use all of 4 plugins (fzf-tab-bin, zsh-autosuggestions, zsh-syntax-highlighting, zsh-history-substring-search) and I have a better shell in zsh than I will ever have in fish, I don't need anything more fancy and oh-my-zsh is hell to work with compared to a simple .zshrc I handrolled because it's got any other shell I know beat (yes I know of nushell and it is cool, but it's even less posix than fish). also, once you're done run zcompile .zshrc, you won't regret it.

[–] [email protected] 2 points 1 year ago (1 children)

It worked! Thank you so much. That's all I need. I have seen people use zsh-history-substring-search and fzf-tab but I don't currently need them, so I won't use them. Once again, thank you so much.

[–] [email protected] 1 points 1 year ago

No problem, I was looking for this after I tried using fish seriously for a month and it was the only thing I needed

load more comments (3 replies)