[Fish-users] Capture output and status of a command

2013-09-05 Thread Chris Wright
I'm trying to get both the output on stderr and the return code of a command. I can put: set foo (/bin/false) This sets foo to the output of /bin/false (the empty string) and $status is overwritten by the status code of set. How do I get both at once?

Re: [Fish-users] Rearranging my $PATH

2013-07-04 Thread Chris Wright
set -x PATH /sbin /usr/sbin /bin /usr/local/sbin /usr/sbin /usr/local/bin /usr/bin Should do the trick. Put it in ~/.config/fish/config.fish and Bob's your uncle. Rearrange as necessary, though I'd be leery of overriding /sbin and /bin. 2013/7/4 Robert Carpenter > Hey Fish Users, > > My $PATH

Re: [Fish-users] “fg -”

2013-06-20 Thread Chris Wright
Synopsis: fg [PID] So if you have the PID of the process, you can use that directly. Otherwise you can use the job -> process mapping operation, '%', to specify which job to put to the foreground. 2013/6/20 Robert Carpenter > Ah, indeed, I think I read your initial post too quickly. > > In pla

[Fish-users] Raves: helpful error messages

2013-06-20 Thread Chris Wright
I copied and pasted a line intended for bash of the form: foo && bar The error message says 'Did you mean "COMMAND; and COMMAND"? See the help section for the "and" builtin command by typing "help and".' And then it printed my input with a caret pointing to the offending column. It's awesome! It

Re: [Fish-users] Suffix pattern removing

2013-06-17 Thread Chris Wright
2013/6/17 Luciano ES > I agree that 'basename' doesn't quite cut it, and your request is fair. > > On the other hand, I think you have grown too accustomed to the quirk of > one specific shell, although other shells have something similar. > > I would recommend you achieve what you want with sed,

Re: [Fish-users] Equivalent of bash's $0?

2013-06-11 Thread Chris Wright
It's hacky, but you could read /proc/$PID/cmdline. It's a NUL-delimited file containing the entire commandline used to start the process. Then you can use readlink -f to find the absolute path. If the first element resolves to the path of fish, the second should resolve to the path of the script.

Re: [Fish-users] Unreadable!

2013-05-12 Thread Chris Wright
2013/5/12 Bryan Kilgallin > Hi Chris: > > Thanks for writing. > > > What is your actual complaint? >> > > Here is a link to a document plain English check-list. > http://www.plainlanguage.gov/**howto/quickreference/**checklist.cfm

Re: [Fish-users] Unreadable!

2013-05-12 Thread Chris Wright
What is your actual complaint? "It has a high reading level" is true, but is the problem polysyllabic terminology that you don't understand? Is it sentence structure that takes you more time to parse than you think appropriate? Do you read it and parse it and then have trouble understanding how it

[Fish-users] Changing the minimal prompt

2013-02-23 Thread Chris Wright
I've noticed that fish replaces my prompt with the string '> ' when fish_prompt returns a string that's too long. How do I control this string, or detect inside fish_prompt the available width? -- Everyone hates slow websit