[Fish-users] Virtualenvwrapper for fish
Hi, I got tired of virtualenvwrapper, and to have to go back to bash to create/delete virtualenvs (I was using a simple workon function to activate them from inside fish)... and I decided to do a rewrite https://github.com/berdario/invewrapper It's in pure python, so it can actually work everywhere; but the main reason I was compelled to write it, is because nowadays I've been a fish user for the whole past year :) Yes, I know about virtualfish... https://github.com/adambrenecki/virtualfish but I actually didn't know about it, when I started invewrapper :) (anyhow, the philosophy behind it is kinda different, so I'd expect that people might prefer one or the other) Please, let me know if you have some feedback :Dario -- Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
[Fish-users] How to specify path to config.fish when is started from command line
unlike bash or zsh, fish respects the XDG base directory specification http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html thus, like every other well behaving program, you can just do env XDG_CONFIG_HOME=/tmp fish and the new fish instance will load /tmp/fish/config.fish -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
Re: [Fish-users] Send in your prompts!
Here's mine: http://bazaar.launchpad.net/~berdario/+junk/dotfiles/view/head:/fish/prompt.fish (I make also use of workon_funcs.fish by Bruce Kroeze in the same repo) it checks for both hg and git branches, but only when the previous one is a git or hg command (thus, potentially changing the current branch) or if the pwd changed thus avoiding to launch an expensive dvcs command (otherwise noticeable if you're in a directory and keep the enter key pressed) it also adds the last exit status at the end of the prompt, if !=0 I still want to clean it up a bit though... especially the switch for the root user that I kept from the original prompt function -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
Re: [Fish-users] $status in prompt
just another thing: you talk about "subshell", but that term is used only 3 times in all the documentation... "command substitution" seems to be the more used term what is the official policy? should we refer to it as the first or the latter? if either, I think the documentation should be updated to remove the old name for it also: I had some small bumps when trying to check the documentation: INSTALL is still talking about the darcs repository, and to use ./configure but there is no ./configure, only ./configure.ac which should be fed to autoconf (but there's no mention about it) -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
Re: [Fish-users] $status in prompt
On 10 July 2012 19:17, Dario Bertini wrote: > I was about to add documentation for the echo builtin... but then I > realized that it has already been written and it's there in my local > checkout, so apparently even the online documentation is a bit > outdated: > http://ridiculousfish.com/shell/user_doc/html/index.html#echo whoops, this url should obviously have been http://ridiculousfish.com/shell/user_doc/html/commands.html#echo -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
Re: [Fish-users] $status in prompt
I've done 2 very small pull requests: https://github.com/fish-shell/fish-shell/pull/220 https://github.com/fish-shell/fish-shell/pull/221 I was about to add documentation for the echo builtin... but then I realized that it has already been written and it's there in my local checkout, so apparently even the online documentation is a bit outdated: http://ridiculousfish.com/shell/user_doc/html/index.html#echo I guess it still hasn't been setup to be automatically updated? (the first pull request is for the pwd command doc... not very useful, but at least now the builtins are complete) -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
Re: [Fish-users] $status in prompt
On 9 July 2012 22:14, David Frascone wrote: > $status, like $? in bash, will be overwritten by EVERY command executed. > > So, given an abridged version of your example: > > codemonkey@monkeytree ~/W/grive> function dummy > > nonexistant command > > echo $status > > end > > codemonkey@monkeytree ~/W/grive> dummy > > fish: Unknown command “nonexistant” > > Standard input: nonexistant command > > ^ > > in function “dummy”, > > called on standard input, > > > nonexistant: command not found > > 127 > > codemonkey@monkeytree ~/W/grive> echo $status > 0 > codemonkey@monkeytree ~/W/grive> > > > The 'nonexistant' command sets the status to 127, which is displayed, but, > since the echo executes after the error, echo itself returned zero, which > then zero'ed out the status. > > In the discussion of setting your prompt, that's why you have to store the > value. $status is volatile, and will change after every command. Just like > $? in other shells. > > Hope this helps, > > > -Dave > Do you really think I could had written that example without understanding what you just explained? moreover: just try adding "unexistantcommand" at the bottom of your fish_prompt function: you'll see that it's more complicated than that (due to the fact that other shells usually compose their prompt with an env variable with is own syntax, while fish chose a more flexible -and simpler- approach) I don't want to get through as being hostile, but I'm getting quite frustrated by this back and forth... the issue is imho very simple: either this is recognized as a true inconsistency, and it's chosen to be dealt with by adding something to the documentation or you don't see this as truly inconsistent, and you think I should've thought out better my fish_prompt function in the first place either of these decisions are fine, let's just try to settle it with just few more words, okay? :) Peace :Dario -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
Re: [Fish-users] $status in prompt
On 9 July 2012 04:16, Kevin Ballard wrote: > What should be documented? The fact that running commands overwrites $status? > obviously not: I'm talking about the fact that $status behaves like a global variable that gets rebinded locally in every function http://dpaste.com/hold/768717/ -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
Re: [Fish-users] $status in prompt
On 1 July 2012 23:14, ridiculous_fish wrote: > I wasn't able to reproduce this. If you share your fish_prompt function, I > can dig into it a bit more. > this is my current function: http://dpaste.com/768437/ as I said: this works, thanks to the suggestion of Tom Most... but if you remove the 3rd line, it doesn't work... that's fine, I guess... but it should be documented in the help -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
Re: [Fish-users] $status in prompt
On 22 June 2012 02:43, Tom W. Most wrote: > It works for me, but of course it does need to be referenced in the > first statement in the prompt. This is my prompt: > Thank you, it works... but it seems a bit unintuitive that it has to be the first statement: I mean, fish_prompt is called each time, so having some other instructions inside would reset the $status, and then I don't see how it could still contain the correct value, after returning from fish_prompt whatever... now I don't have to worry about it anymore, thanks :) -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
[Fish-users] $status in prompt
In my fish_prompt function I added the $status variable, to let me instantly know the exit code of the last command I run (like in the old prompt I was using on zsh) but in my prompt, the value is always stuck to 0 is someone else able to reproduce it? is it a known behaviour? is it a bug? -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
[Fish-users] bzr completion (and other vcs?)
Hi, I recently started to use fishfish... I'm a bzr user (but obviously also an hg and git one) and I read a previous mail about it (I cannot reply to it since I wasn't subscribed to the list at the time) >From the homepage, I assumed that the completion was done by reading the man pages on the fly... by looking into it I found out that actually there's the fish_update_completions builtin function to be called manually if you run it though, it'll create new completions for git: the problem is, those completions don't work out of curiosity, to see if it was feasible to adapt the mercurial completions for bazaar, I found out about the make_vcs_completions in the fishfish sources first thing: if some programs are already known to be better served by some other completions (like the ones for which the completions are generated with such a script), shouldn't it be better if fish_update_completions blacklisted git, hg, svn and such programs? btw, I then tried to use make_vcs_completions to generate bzr completions... but I got lots of errors like: fish: path_get_path( 'bzr' ) bzr: ERROR: No help could be found for 'bzr'. Please use 'bzr help topics' to obtain a list of topics. fish: proc::read_try('bzr $argv; ') I tried to run it with "fish -d 3" but I can't understand what is going wrong... I also looked at the make_vcs_completions script itself, by checking it step by step and adding echo statements, but I got lost after line 100, when it seems that it's using a more-than-70 lines long string substitution (or at least, that unmatched single quote seems to be doing that) should make_vcs_completions be rewritten? (it's 2 years old) what is the best approach to get some nice autocompletion for bzr? other people interested out there? should some of this be reported as an issue on github? -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users