I am trying to get used to fish as a default shell. I like some things in it, but can not quite get used to other things, so I wonder - maybe I am cooking it wrong? So here are things that I could not find a solution for, while switching from bash.
bash$ DISPLAY=:1 gedit
- very simple thing, how do I set and environment variable for just one command execution in the most simple possible way.bash$ scp hostname:somedir/*.jpg .
- when I try to run this in fish, for some reason I get "fish: Warning: No match for wildcard 'hostname:somedir/*.jpg'. The command will not be executed." and I could not figure out how to actually run the command in a quick Googling.I do like the colors, the shortened cwd in the prompt, the univeral history and univeral variables, lower memory usage and funkier completions. Any other fish features people like? Especially I am interested in features that are not enabled by default.
Share on Twitter Share on Facebook
Comments
Aigars Mahinovs: Fish-ing for tips | Linux-Support 8 years, 8 months ago
[...] source: Go to Source Feed source: http://planet.debian.org/rss20.xml License: The original licenses are retained – [...]
Link | ReplyBenjamin Sigonneau 8 years, 8 months ago
Regarding environment variables, I guess the easiest answer to your problem would be:
Link | Replybegin; set -l DISPLAY :1; gedit; end
which is more verbose than the sh way. So that you might want to write an helper function.
Douglas 8 years, 8 months ago
ad scp: I guess fish behaves like tcsh, that is: If you use any wildcard (?, *) it will try to find a file that matches (and as you don't have a file with that name in the current dir, it complains. You HAVE to escape or quote if you want to pass the wildcard to (in that case) scp, so
Link | Replyscp hostname:somedir/\*.jpg .
should work.
(bash is clever enough to figure out what you want to do)
I haven't used fish, but I would recommend that you check the manpage for bash; it might be able to do what you want if configured correctly (e.g. is "the shortened cwd in the prompt" maybe what bash gives you if you set
PROMPT_DIRTRIM=2
?)
James McCoy 8 years, 8 months ago
Fish was probably what got me in the habit of not using "ENVVAR=foo command". You can just as easily do that by using the env command, "env ENVVAR=foo command", and it's shell agnostic.
Link | ReplyDmitrijs Ledkovs 8 years, 8 months ago
I miss bash-completion for things that don't have fish completion, I wish there was a way to'whitelist' bash-completions for some things, when fish doesn't offer it.
Link | ReplyNew Comment