4 ms·
My best progress in shell was by switching to Fish. Much more intuitive for programmer. Guess what this does: while true clear df sleep 1 end
by jkot 10y ago
My best progress in shell was by switching to Fish. Much more intuitive for programmer. Guess what this does:
while true
clear
df
sleep 1
end
- dllthomas 10y agoI second the voices, one downvoted but none really addressed, wondering why this is manifestly an improvement over the bash equivalent. I certainly don't demand that everything in Fish be an improvement over everything in bash for Fish to nonetheless be superior... but this was presented specifically as an example of how Fish is great, and I could just as well say "Guess what this does" of the obvious bash equivalent: while true; do clear df sleep 1 end
- deleted 10y ago[deleted]
- INTPenis 10y agowhile sleep 1; do clear df done
- snvzz 10y agowatch -n1 df
- appelza1 10y agowhile true; do clear df sleep 1; done --Bash equivalent, not sure I see your point
- laurent123456 10y agoInterestingly, none of the two Bash versions in the comments are equivalent to your code, which kind of prove your point with Bash being tricky. `while sleep 1` means the script will sleep once before running `df`, while it should only sleep after. The other command also won't work because it's missing colons between commands.
- INTPenis 10y agoThe point I wanted to make was that OP sacrificed compatibility with all major distros for being rid of "; do", essentially. I just don't see the point. Bash might have flaws, nothing is perfect, but it's one vital piece of software that most distros have installed.
- vcarl 10y agoI second this. No shortcut to search history, just start typing and hit up. Instead of ctrl-e or whatever it is, it has the same "move by 1 word" shortcut as literally everything else on the computer. The pre-made prompt configurations that you can browse (with preview!) in a web browser is nice too. ZSH doesn't compare imo.