3 ms·
You can see help pages on command line with 'man commandname' or with 'commandname --help' Regarding customizing your prompt, try running 'fish_config' and che
by siteshwar 13y ago
You can see help pages on command line with 'man commandname' or with 'commandname --help'
Regarding customizing your prompt, try running 'fish_config' and check list of already available prompts from prompts tab.
- barrkel 13y agoThe built-in web browser is a cute feature, but all the prompts waste space with <username>@<hostname>. Autocompletion - a feature I generally don't use in other contexts - and reduced functionality seem to be its main USPs. With readline, process substitution and subshells (for ad-hoc fork/join jobs started from the command line) it might be competitive with other shells. For example, a reasonably common pattern for me, on the command line, is: $ for d in *; do test -d "$d" || continue ( cd "$d" time-consuming-task-1 time-consuming-task-2 ) & done I don't think I could do this in fish today without writing a script, as it doesn't have subshells and can't run functions in the background. There's also a big advantage in having the shell be the same (or highly similar) to your preferred ad-hoc scripting language. It means you can retrieve complex commands from your history and paste them into the script, with only a slight cleanup to parameterize them. A whole complex operation can be spiked and tested interactively before being put together into something reusable - possibly without foreknowledge that the task is going to be that tedious, or needs to be encapsulated. Zsh looks like a better alternative to bash for these reasons.
- donri 13y agoThis should be the translation: for d in * test -d $d or continue begin cd $d time-consuming-task-1 time-consuming-task-2 end & end However it errors; seems you can't do `end &`. Probably a bug; I'll report it. When fixed, I imagine we could actually do it even better with fish: for d in * if test -d $d cd $d time-consuming-task-1 time-consuming-task-2 end & end
- JanKanis 13y agoFish currently does not support executing shell functions or commands in the background with &, only external programs. This is a known omission, but the best way to fix it is to make the shell interpreter code thread safe so we can actually write multithreaded shell code. Currently fish only uses threads for potentially blocking i/o operations. But implementing this is quite a bit of work and has not been done yet. Having said that, `enc &` erroring is indeed a bug, expected behavior would be to run the `begin ... end &` block in the foreground anyway.