Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: ![]() if [ [ -r " $"' Step 8 - Install powerlevel10kĪs you can see, installing Oh My Zsh is quite simple, but it can significantly increase your productivity. # Initialization code that may require console input (password prompts, # confirmations, etc.) must go above this block everything else may go below. Should stay close to the top of ~/.zshrc. It’s not that big of a deal, but I always forget about it.# Enable Powerlevel10k instant prompt. Instead of $1, $2, $3 and etc, on Fish we have $argv, $argv, $argv, etc. your shell history will be saner (probably).you can copy-paste your terminal to someone else and they don’t have to know what your 348 aliases do.you can use an abbreviation similar to what you want, once it expands, edit it easily.Aliasesįish doesn’t have the concept of aliases, instead, you either wrap your command in a function (Fish has a function that does that for you, which is called alias), or use abbreviations.Ībbreviations expand once you type them, which is actually better in some ways: Things like for loops and () instead of $() took me a while to get used to, after I don’t know how many years of writing things that way, but, once I got used to, it is actually simpler. If you usually use just plain commands and pipes, it might not be an issue for you. Its common for me to script my way into the shell itself when dealing with issues, so, in the beginning, I struggled a bit. Differencesįish does not talk POSIX shell, so, some things are different. I use Fisher, because I don’t really need the whole plugin framework thing from oh-my-fish, but both of them are very good and you can choose whichever you like more to manage your plugins. Other than that, I just put a couple of files in their right folders, setup a bunch of abbreviations, and that’s it. grc (colorize output of several commands).fzf (for CTRL+R history search and other goodies).Some of the features that you’ll need plugins on ZSH/Bash, and are native on Fish:īecause of that, I only need a couple of plugins: Of course, performance is not the only unit of measure, otherwise I would use just plain Bash (or SH), but if I can get the same features faster… that matter a lot to me. ![]() ![]() I open new shells literally hundreds of times a day, I don’t want to waste those milliseconds. It gets a bit slower now, but still faster than an empty ZSH setup. This can all be confirmed by comparing my Fish setup’s performance (it has some plugins, abbreaviations, completions, functions, etc) with empty ZSH and Bash: It also has lazy loading of completions and functions: you just put them in the right folders ( ~/.config/fish/completions and ~/.config/fish/functions), and it loads them when you first try to use them, instead of every time you open a new shell. You don’t need to set them on every shell init, instead, you set them once ( set -U) and they will be added to your ~/.config/fish/fish_variables. While this is helpful to debug things, it is not very fast.įish allows you to set universal variables, which are shared across all shells and system restarts. You also need to set your aliases, environment variables and etc, every time you start a new shell. On both Bash and ZSH, you’ll probably end up with a whole lot of source something.sh, which, once added up, can slow your shell quite a bit. I honestly never though ZSH was this slower compared to Bash… maybe it got slower over the years… I don’t know, but once you use fish the first time, you’ll notice it. For s in bash zsh fish do hyperfine -warmup 3 " $s -i -c 'exit 0'" doneįish is only a couple ms slower than Bash, but almost 4x faster than ZSH.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |