What do you do when you have to use a computer without your customization? Perfect is the enemy of good, worse is better, join us on the dark side, all that jazz. :)
Is fish really really REALLY worth it?
What do you do when you have to use a computer without your customization? Perfect is the enemy of good, worse is better, join us on the dark side, all that jazz. :)
Is fish really really REALLY worth it?
> What do you do when you have to use a computer without your customization?
How are people running into this situation so often? I don't sit down at my coworkers desks and start using their accounts. On production servers, I still have zsh and although some of my custom utilities are missing, it is not like I am somehow crippled by their absence.
This concern is like being opposed to cordless drills and screwdrivers because "what would happen if you found yourself with only a regular screwdriver?" ...well, what of it? If I found myself inexplicably with only a regular screwdriver, I would use it. Not a big dea. It's not like zsh users turn into blithering idiots as soon as they don't have their fancy PS1 set and are missing a few completion options.
I agree with this attitude if indeed this was the case. I don't see how zsh or fish constitute cordless drills and screwdrivers, it feels more like they are the right-y version to the left-y version of the regular screwdriver.
But maybe its because I don't know their killer features, I always try to pay attention to them and play with them occasionally but it never clicked for me why its so much better.
As someone who has used an increasingly customized *nix command-line environment for decades, I'll say that this corner-case occupies a vanishingly small amount of my time. I just doesn't make sense to optimize for it. I currently use zsh, which is frequently not available by default. This implies installing a package, and I don't see how that's any worse for fish. I freely admit that my workflow as a developer vs. (e.g.) a sysadmin provides a greater degree of relative control over my day-to-day working environments.
I do have to work in non-customized environments from time to time. I find this no worse than using Someone Else's Keyboard -- maybe there's some clumsiness at first, but you soon get the hang of it. If you switch environments frequently, the switch becomes unnoticeable.
That said, I've also put continual effort into portability and ease of deployment of my customizations over the years. I can run one command on a networked host and have my rcfiles land there and be ready to use. This is pretty easy to do with a git-managed homedir repo, especially on a provider like GitHub where you can fall back to grabbing tarball if needed. I currently use vcsh[1] & mr[2] to manage my repos -- for that I use a bootstrap script hosted in an orphan branch of the same repo.[2] An efficient setup process of this type also makes it easy to integrate with provisioning tools, e.g. Puppet, Chef, or even just shell scripts.
[1] https://github.com/RichiH/vcsh
Uh, by that logic I would only use notepad.exe.
I'm asking, not telling.
For regular shell scripts I tend to still prefer #!/bin/ksh and not bourne shell (no bash is not bourne shell).
I have to admit the line of thinking you're advocating reminds me of the vim/emacs "wars". With the "vim is on ALL THE SERVERS", well yeah but unless i'm at a serial console thats not all that convincing as a TRAMP user. I customized tramp so I could edit files remotely through sudo. What do I care about the version vim installed on the servers?
Even Solaris had zsh in the default install.
Actually, it's still part of the "default" group packages (similar to an installation profile).The default shell for new users (including root) is now bash though.
Take it for a test: go write a project euler problem (or any small programming task--doesn't have to be math) in your shell of choice. It's painful.
There are weird features of shell languages that will never go away (globs and unquoted strings sharply limit the design space), but even given those limitations, it's possible to design nicer languages.
I don't fault someone for saying "right now, I'd rather use the default shell my box comes with, because the pain points of switching are too high". But yes, we really do need something to replace it. I think both zsh and fish make nice steps, but I don't think either really meets my hopes.
"If you have a strong understanding of other shells, and want to know what fish does differently, search for the magic phrase unlike other shells, which is used to call out important differences."
"stdin and stdout can be redirected via the familiar < and >. Unlike other shells, stderr is redirected with a caret ^"
That's pretty, no argument there. But I already remember to count the std's from 0, so stderr is &2. Not as pretty, fish is nicer, no argument. But its not MUCH nicer, and I'm going to have to use &2 here and there in my life anyway...
So:
- fish has no dedicated syntax for setting variables
- fish does not have an export command
- fish stores the exit status of the last command in $status instead of $?.
- fish does not use backticks ` for command substitutions. Instead, it uses parentheses.. I'm pretty sure good bash form is $() these days, not backticks. So you're spared the dollar sign.
'etc 'etc. I agree we need something to leapfrog what we have but these changes, while nice improvements, seem minor. At least as far as I can see! That's why I asked. Maybe there's some more neat stuff that makes it a significant improvement.
set foo bar # sets foo to bar
set -x foo bar # sets foo to bar and exports it to the environmentI'm asking because i'm using powershell with conmeu for almost 2 years now without a problem. Plus with conmeu i also run vim and farmanager (old school file manager ) in 2 separate tabs.
Really though, it's just the shame that Microsoft hasn't improved their Terminal app in over 16 years at a rough guess, from a functionality standpoint. That's just ... that makes no sense. Not when they're doing so much more to encourage sysadmins to use their command prompts and PowerShell. For a company that can make such great IDEs and OSes, why can't they combine both into a masterful shell window?
Maybe evolution will also go the other way around: Nautilus and other file browsers have rudimentary shell-like use & feel, e.g. when searching for something. Extending that could create some interesting features.
How much time can I spend on customizing something to be more convenient and still save time in the long run? Can I spend half an hour to speed up a task I do daily by five minutes? Can I spend a month learning Emacs and save time in the long run? Can I spend two weeks learning how to touch-type?
The answers invariably are very much dependent on your personal work. But to me, the far more important question is:
Can I do anything that makes my life more pleasant? To me, personally, fish really improves my enjoyment of terminal usage. Productivity does not even enter this equation, but I suspect that I work faster when I am happy. I in fact do use fish, and Emacs, for the simple reason that I enjoy using them. I might be more productive with other tools, but I would not enjoy my work as much.
So yes, it is a matter of love. Do what you love, not what pays best.
"What do you do when you have to use a computer without your customization? "
I can't answer for other people, but when I am logging into other systems I am very seldom performing the same tasks that I do on my development workstation. I don't need those customizations because I'm not doing the kinds of things that require them.
So when I log into another system, I just use it. I don't try to do the things that I can do on my local system - maintaining awareness of the differences is not a challenging thing.
Also, fish shares the history between the shells out of the box, unlike zsh... but it chose to do it in a different way (that is, commands are available even if one of the shells hasn't been closed, unlike bash... but they aren't available right away after entering a single new command, like most zsh configurations that I've seen)
If by customization you mean setting what happens when you write invalid glob, how much you can store in the history, whether prompt beeps on error, whether integers starting with 0 are octal, what regular expression engine is used, and so on, feel free to use zsh - it's great, really, after you configure everything, that is - fish shell won't let you change that by design. This is not a flaw - author believes that configuration is the root of all evil (and I agree with him).
But back in bash-land, _of course_ I alias "ll" to "ls -Flah". And when I'm on a system that doesn't have this alias, then, well, I just type "ls -la".
As others explained, just because I've customized my work environment doesn't mean I've forgotten to use the plain versions.
I don't see any problem with using whatever pleases you (even if those are very obscure tools), if with transition you don't lose ability to use less convenient (but common) tools on occasion. And you usually don't lose that.
On a side note: This is my computer. There are many like it, but this one is mine.