English 中文(简体)
Recommendation - Zsh vs FishShell. Scripting, productivity and poweruser perse [closed]
原标题:

Closed. This question is opinion-based. It is not currently accepting answers.


Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 4 years ago.

I have spent sometime trying to pick one, on net comparisons are for zsh vs bash and fish vs bash. But, I could not find any comparison for zsh vs fish. I program in C and C++, apart from hello-world types, never done any major scripting. But now trying my hands at python and shell-scripts. Which shell keeps more juice in terms of productivity first and then development? Or in the end, the power and usability of any shell comes to its _rc files. So am I good enough with bash?

最佳回答

Historically there was a flame ware of sorts between the C shells (CSH and TCSH) and Bash. The complaint against the CSH variants are that they re bad for scripting.

In the years I ve been a CLI junkie, I ve never done any standalone scripts where the scripting language was picked because that s what my shell was.

I ve written a variety of scripts that can broadly be divided into two categories:

  1. Those that help my command line productivity
  2. Those that are not directly related to my command line productivity.

Scripts in category 1. are almost always written in my shell scripting language (often as functions as I m using ZSH and was previously using BASH both of which support functions).

Scripts in category 2. are written in whatever seems like the most efficient (both development time and running time taken into consideration). I often find myself writing small scripts in Perl, C (compiled, obviously), BASH/ZSH/SH or what ever else I want. I ve done a little Python scripting (but not much), and even resort to Java on occasion (compiled-ish, again).

So what am I babbling about? Don t base you choice of shell on its standalone scripting capabilities. Choose your shell for it s utility to you as a shell. Script in whatever else you choose. You ll probably be good enough with BASH as your shell (though I like ZSH a bit more, **/* globbing is nice and a few other small things, but most scripts I ve written for ZSH are early identical to their BASH counterparts).

问题回答

I had the same question and found :

if you can t find any comparison between zsh vs fish, then try them out yourself. That s the only way you can tell which one you prefer, nobody else can tell you that. Also, define the meaning of productivity. For me, its the abundance of modules and the language s internal capabilities. If you have started with Python, go for it. As for shells, you can learn less of it (not saying totally forget about it), with regards to maybe understanding your rc scripts and other system stuffs etc. Beyond that, Python can do what the shell does.

You ll be most productive in an environment you already know. I used bash for years and its fine. It completes almost everything, can be used with git, mercurial ...





相关问题
Parse players currently in lobby

I m attempting to write a bash script to parse out the following log file and give me a list of CURRENT players in the room (so ignoring players that left, but including players that may have rejoined)...

encoding of file shell script

How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks

Bash usage of vi or emacs

From a programming standpoint, when you set the bash shell to use vi or emacs via set -o vi or set -o emacs What is actually going on here? I ve been reading a book where it claims the bash shell ...

Dynamically building a command in bash

I am construcing a command in bash dynamically. This works fine: COMMAND="java myclass" ${COMMAND} Now I want to dynamically construct a command that redirectes the output: LOG=">> myfile.log ...

Perform OR on two hash outputs of sha1sum

I want perform sha1sum file1 and sha1sum file2 and perform bitwise OR operation with them using bash. Output should be printable i.e 53a23bc2e24d039 ... (160 bit) How can I do this? I know echo $(( ...

Set screen-title from shellscript

Is it possible to set the Screen Title using a shell script? I thought about something like sending the key commands ctrl+A shift-A Name enter I searched for about an hour on how to emulate ...

热门标签