Re: [Fish-users] question regarding "ALT + L"

2021-05-16 Thread Greg Reagle
How to use the fish command line to answer your questions. greg@op740 ~> bind | fgrep '\el' bind --preset \el __fish_list_current_token greg@op740 ~> functions __fish_list_current_token # Defined in /usr/share/fish/functions/__fish_list_current_token.fish @ line 4 function

Re: [Fish-users] Command Substitution. Just a trap for newcomers?

2021-05-03 Thread Greg Reagle
Hello Malcolm Fitzgerald. Thanks for your feedback about fish and its documentation. It looks like, if I am understanding correctly, your issue was that you were putting parentheses around the condition of an if statement. This is not a part of the syntax of an if statement in fish, and it is

Re: [Fish-users] Command Substitution. Just a trap for newcomers?

2021-05-03 Thread Greg Reagle
On Mon, May 3, 2021, at 07:07, Greg Reagle wrote: > Still, it might be a good idea to add an explicit warning to the documentation > not to put parentheses around the condition of an if statement lest you get an > error. On second thought, it might be a better idea to add a li

Re: [Fish-users] Trying to get the height and width of my terminal

2020-09-28 Thread Greg Reagle
When I want to find a terminal's height and width, I check environment variables $LINES and $COLUMNS and/or use the output of tput lines and tput cols. As far as I understand, these techniques are independent of the shell in use. On Mon, Sep 28, 2020, at 15:43, fisherman via Fish-users wrote:

Re: [Fish-users] Yet another * issue

2020-08-31 Thread Greg Reagle
Why are you quoting the asterisk? That won't work on any shell. On Mon, Aug 31, 2020, at 14:13, John Chludzinski wrote: > Whereas, I’ve haven’t had time to try again to duplicate the ‘rm’ problem, I > have encountered yet another * “issue”: > > I tried: > > ls >

Re: [Fish-users] * with fish ?

2020-06-18 Thread Greg Reagle
On Thu, Jun 18, 2020, at 12:59, John Chludzinski wrote: > In the Bourne shell this works without hiccup: > > tar xf $SOCEDS_DEST_ROOT/examples/hardware/a10_soc_devkit_ghrd/tgz/*.tar.gz How many files match that pattern? I don't need to know the number other than, Is it zero, one, or more than

Re: [Fish-users] new to fish , how migrate my .bash_profile

2019-10-11 Thread Greg Reagle
On Fri, Oct 11, 2019, at 03:34, Xavier wrote: > Thanks, I'll check it out. looks like no direct way to make fish consume my > shell configure . I will do the configure, thanks very much for help. Learn fish and re-write (translate) it. If you need help re-writing, and you have a specific

Re: [Fish-users] || and propagate error

2019-09-07 Thread Greg Reagle
Okay. I think I understand. I'll try to give some advice. The command 'exit' does exit the script or shell. If you are inside a function, 'return' will exit the function not the whole shell. If you want to preserve the error code value, something like this will do: function foo ls #

Re: [Fish-users] || and propagate error

2019-09-07 Thread Greg Reagle
Hi. I'd like to help, but I don't understand your goal. Please elaborate. On Sat, Sep 7, 2019, at 06:20, Marcin Zajączkowski wrote: > Hi. I would like to have my command send notification about failure and > keep/propagate the original error code. > > I was thinking about something like: > >

Re: [Fish-users] Update to the PATH with Fish

2019-08-03 Thread Greg Reagle
On Sat, Aug 3, 2019, at 06:53, Neil wrote: > All this help has got me checking my desktop computer. I am running MX > Linux v18.3. Fish comes ready installed. I now see that my version is > 2.4. Looking at the web site I see that the latest version is 3.2. > > I am guessing that version 3 will

Re: [Fish-users] Update to the PATH with Fish

2019-08-02 Thread Greg Reagle
On Fri, Aug 2, 2019, at 06:52, Neil wrote: > Thanks for that. I did some reading of the above help files first, and > then I used > > set -U fish_user_paths ~/bin $fish_user_paths > > as suggested. This seems to be working. You are welcome. Note that since the -U option makes it universal,

Re: [Fish-users] Update to the PATH with Fish

2019-08-01 Thread Greg Reagle
On Wed, Jul 31, 2019, at 08:07, Neil wrote: > I would like to add my home bin folder to the PATH variable. I can do > this for a single session by using the set PATH command. But that, as I > said, is just for the one session. As soon as I leave the terminal > screen it is lost. > > Is there

Re: [Fish-users] git-refresh - New oh-my-fish Plugin

2019-06-24 Thread Greg Reagle
On Mon, Jun 24, 2019, at 16:16, Myrddin Emrys wrote: > Essentially, he wants this function to have git manage a folder the > same way Dropbox does, keeping them in sync automatically, in the > background. You're looking at it like a source repo; I suspect Niels is > looking at this from the

Re: [Fish-users] Exclude certain cmds from being added to the history

2019-03-24 Thread Greg Reagle
On Sun, Mar 24, 2019, at 04:40, Manfred Lotz wrote: > In zsh I could exclude certain commands from being added to history > like follows: Start the command line with a space and it will not go into history. ___ Fish-users mailing list

Re: [Fish-users] "watch" in fish

2019-02-20 Thread Greg Reagle
On Tue, Feb 19, 2019, at 09:20, David Croll wrote: > In the meanwhile, I wonder when the "watch" command will be implemented > in fish. > > Define a function: > > function f > echo "f" > end > > Then: > > watch -n 10 "f" > > does not work, as watch runs in bash, and bash doesn't know of

Re: [Fish-users] Scripts for initializing freesurfer and MRtrix

2019-02-10 Thread Greg Reagle
I'd like to help you, but I don't understand what you are asking, or why you are asking it. Be specific and detailed. Is there a script written for bash that you want to translate to fish? If so, post it or a reference to it. I have never heard of freesurfer, MRtrix, or FSL. What is your

Re: [Fish-users] Running a fish function with the 'watch' command

2018-08-25 Thread Greg Reagle
I don't see any reason to convert to Bash. watch(1) (on my system) executes its argument with "sh -c" unless the -x option is given in which case it uses exec(2). Read the man page. One options is to make whatever function you want to watch into a command (fish script in a file). Make sure

Re: [Fish-users] Introduction and plans for a book about Fish

2018-06-11 Thread Greg Reagle
Hi Rob. If writing an ebook for fish, you might want to have a look at the Bash documents at http://mywiki.wooledge.org/ as examples of ideas for documentation. Something like the BashPitfalls for fish (if it has any pitfalls) would be very cool. On Mon, Jun 11, 2018, at 11:00, Robert O.

Re: [Fish-users] "here document" for FISH ?

2018-06-05 Thread Greg Reagle
On Tue, Jun 5, 2018, at 18:05, John Chludzinski wrote: > Is this in the offing? On the plate? Coming soon to a theater near you? See https://github.com/fish-shell/fish-shell/issues/540 as well as https://fishshell.com/docs/2.0/design.html.

Re: [Fish-users] Rationale for not using && and ||

2017-10-18 Thread Greg Reagle
On Wed, Oct 18, 2017, at 17:37, John Chludzinski wrote: > I have someone who occasionally uses my machine and immediately begins > complaining about fish. > > Latest rant is fish's use of 'and' and 'or' in lieu of && and ||. > > Is there a rationale for these design decisions? Yes there is.

Re: [Fish-users] Tips & Tricks: use #hashtags in your history!

2017-10-16 Thread Greg Reagle
On Sun, Oct 15, 2017, at 16:18, regiv...@gmail.com wrote: > Hello, > > There are hundreds, thousands of different commands, sometimes very > obscure, especially when English is not your native language. > > So now I tag the commands I write for the first time: > > sudo swapoff -a; sudo swapon

Re: [Fish-users] question about command history for article

2017-10-09 Thread Greg Reagle
On Sun, Oct 8, 2017, at 13:12, Mark Volkmann wrote: > Thanks all! I think my explanation at > https://mvolkmann.github.io/fish-article/#CommandHistory is much better > now. Suggestion: change "cannot" do "does not" in the following: [[[ This is why a session cannot recall commands entered in

Re: [Fish-users] question about command history for article

2017-10-07 Thread Greg Reagle
On Sat, Oct 7, 2017, at 20:18, Mark Volkmann wrote: > Here's another way to test this. > - open two fish sessions > - in the first, enter "echo one" > - in the second, enter "echo two" > - in the first, enter "echo three" > - in the second, enter "echo four" > > Enter "tail

Re: [Fish-users] question about command history for article

2017-10-07 Thread Greg Reagle
On Sat, Oct 7, 2017, at 17:50, Mark Volkmann wrote: > On Sat, Oct 7, 2017 at 3:52 PM, Greg Reagle <greg.rea...@umbc.edu> wrote: > > As far as I understand, it is not true that it "manage to only recall > > commands that belong to the current session". Fish remem

Re: [Fish-users] question about command history for article

2017-10-07 Thread Greg Reagle
On Sat, Oct 7, 2017, at 16:45, Mark Volkmann wrote: > The draft version of my article at > https://mvolkmann.github.io/fish-article/ > has an open question which is: > > IIUC, fish maintains a separate command history for each session that > begins with the history of the session from which the

Re: [Fish-users] fish 2.0 release date

2017-09-30 Thread Greg Reagle
On Sat, Sep 30, 2017, at 10:01, Mark Volkmann wrote: > Can anyone tell me when fish 2.0 was initially released? https://github.com/fish-shell/fish-shell/releases https://github.com/fish-shell/fish-shell/releases/tag/2.0.0

Re: [Fish-users] comparing strings in fish

2017-09-04 Thread Greg Reagle
On Mon, Sep 4, 2017, at 11:04, Kurtis Rader wrote: > Beware `expr`s automatic coercion of strings to ints. If you do `expr '234 < > 1234' you'll > get false despite "234" being lexically greater than "1234". Which may be > what you want but > it's a potential gotcha if you really wanted a

[Fish-users] error in man page for test: < and > operators for comparing strings are not part of the standard

2017-09-04 Thread Greg Reagle
When I do a man test I see: <<< test(1) fish test(1) . . . Standards test implements a subset of the IEEE Std 1003.1-2008 (POSIX.1) standard. The following exceptions apply: · The < and > operators for comparing

Re: [Fish-users] comparing strings in fish

2017-09-04 Thread Greg Reagle
On Sun, Sep 3, 2017, at 20:06, Mark Volkmann wrote: > IIUC, there isn't a command in fish that can be used to compare two strings > to see if one is greater than the other in sorting order. For example, this > doesn't work: > > set v1 'foo'; > set v2 'bar'; > if test $v1 > $v2 >   ... > end >

Re: [Fish-users] bug in computing COLUMNS?

2017-09-02 Thread Greg Reagle
On Sat, Sep 2, 2017, at 10:20, Kurtis Rader wrote: > Fish won't work if COLUMNS is one or two either. As I said earlier I > don't recall now what the exact threshold is but I'm pretty sure it was > greater than ten. Similarly, it won't work if LINES is less than two. So > the actual threshold is

Re: [Fish-users] bug in computing COLUMNS?

2017-09-02 Thread Greg Reagle
On Fri, Sep 1, 2017, at 15:05, Kurtis Rader wrote: > Fish won't work if the terminal height is less than two. I don't recall the > exact value but > it also won't behave sensibly if the width is much less than 20. Does fish behave better when the width is less than 20 to pretend that the width

Re: [Fish-users] bug in computing COLUMNS?

2017-09-01 Thread Greg Reagle
On Fri, Sep 1, 2017 at 12:25 PM, Mark Volkmann wrote: > But how can I detect when the width is less than 20 characters? On Fri, Sep 1, 2017, at 12:45, Glenn Jackman wrote: > How about `set term_width (tput cols)` No, I already tried that. tput cols will be set to 80

Re: [Fish-users] bug in computing COLUMNS?

2017-09-01 Thread Greg Reagle
On Fri, Sep 1, 2017, at 08:52, Mark Volkmann wrote: > I'm working in iTerm2 on a Mac. > Entering "echo $COLUMNS" gives the correct value at most window widths. > However, if the width is less than 20, it always reports 80. > Can anyone else reproduce this issue? Yes I can reproduce. I am using

Re: [Fish-users] wc counts too many characters when reading __fish_vcs_prompt

2017-08-26 Thread Greg Reagle
On Sat, Aug 26, 2017, at 20:39, Andrew Toskin wrote: > In the meanwhile, I've just wasted a few hours trying to `sed` my way out of > this problem sed 's/\\x1B\\[[0-9;]*[JKmsu]//g' from https://unix.stackexchange.com/questions/55546/removing-color-codes-from-output Google prevents wasted hours.

Re: [Fish-users] variable types

2017-08-26 Thread Greg Reagle
On Sat, Aug 26, 2017, at 11:43, Mark Volkmann wrote: > Is is correct to say that in fish all variable values are strings? > > For example, > set pi 3.1415928 > string length $pi # 9 > > Is that because the value is actually stored as a string or > does it convert it from a number to a string

[Fish-users] Fwd: Re: functions as commands

2017-08-19 Thread Greg Reagle
Sorry, I should have replied to the list rather than just Mark. - Original message - From: Greg Reagle <greg.rea...@umbc.edu> To: Mark Volkmann <r.mark.volkm...@gmail.com> Subject: Re: [Fish-users] functions as commands Date: Sat, 19 Aug 2017 10:12:27 -0400 On Sat, Aug 19, 20

Re: [Fish-users] status current-line-number

2017-08-19 Thread Greg Reagle
On Sat, Aug 19, 2017, at 08:37, Mark Volkmann wrote: > I'm doing this inside a function: > echo at line number (status current-line-number) > But no matter where I put this in my function, it always outputs 2. > Am I using it incorrectly? Take it out of the parentheses.

Re: [Fish-users] default function parameters

2017-08-18 Thread Greg Reagle
On Fri, Aug 18, 2017, at 18:51, Kurtis Rader wrote: > Add this to the top of the function: > > set -q language[1] > or set language english There is a potential problem with the above though. If $language is set to the empty string, the above code will not set language to english [1]. I say

[Fish-users] Fwd: Re: default function parameters

2017-08-18 Thread Greg Reagle
Should have replied to list. - Original message - From: Greg Reagle <greg.rea...@umbc.edu> To: Mark Volkmann <r.mark.volkm...@gmail.com> Subject: Re: [Fish-users] default function parameters Date: Fri, 18 Aug 2017 18:43:28 -0400 On Fri, Aug 18, 2017, at 18:25, Mark Vo

[Fish-users] Fwd: Re: default function parameters

2017-08-18 Thread Greg Reagle
Should go to list. Sorry for replying wrong earlier. - Original message - From: Mark Volkmann <r.mark.volkm...@gmail.com> To: Greg Reagle <greg.rea...@umbc.edu> Subject: Re: [Fish-users] default function parameters Date: Fri, 18 Aug 2017 17:46:42 -0500 But suppose I

[Fish-users] what is wrong with this use of test and $argv?

2017-06-24 Thread Greg Reagle
Hello. I am using fish version 2.6.0. I wrote the following script: cat testing-test.fish: --- #!/usr/bin/fish test -z $argv; and echo NO argument --- greg@t400 ~/s/bin> ./testing-test.fish NO argument greg@t400 ~/s/bin> ./testing-test.fish 1 greg@t400 ~/s/bin> ./testing-test.fish 1 2 test:

Re: [Fish-users] Completion prefixes are invisible

2017-03-13 Thread Greg Reagle
On Mon, Mar 13, 2017, at 12:17, Tassilo Horn wrote: > Additionally 2: Until this thing is sorted out, I still use zsh as my > main shell. But it just occurred to me that when I have a zsh shell and > start fish by issuing it at the prompt, SHELL will remain /bin/zsh. Is > that intensional? Yes

Re: [Fish-users] find fish and basename

2017-01-30 Thread Greg Reagle
On Mon, Jan 30, 2017, at 08:43, Henning Reich wrote: > I'm to stupid to get my commandline working as expected. Are you feeling frustrated that you've put a lot of time into trying to get this to work without success? > I want to use the results of 'find' and also for output naming. > My first

Re: [Fish-users] Disable beep on failed tab completion

2017-01-09 Thread Greg Reagle
On Mon, Jan 09, 2017 at 01:59:06PM +0100, Thomas De Schampheleire wrote: > When a tab completion cannot be performed because no match is found, > currently I hear a beep. > How can I disable this beep? I don't know about fish, and I hope someone can answer you about fish. You might be able to

Re: [Fish-users] How to expand wildcard?

2016-12-01 Thread Greg Reagle
On Wed, Nov 30, 2016, at 07:37, Shiyao Ma wrote: > Say I have three files, aa, ab, and bb > I want to delete aa and ab. rm -i a* or rm -i a -- ___ Fish-users mailing

Re: [Fish-users] external command inside function fails on OSX

2016-12-01 Thread Greg Reagle
When troubleshooting, reduce as many differences as possible. Your command in the script and you interactive command are different. In the script: diskutil erasevolume HFS+ ramdisk $ramdiskpath Interactively: diskutil erasevolume HFS+ ramdisk "/dev/disk1"

Re: [Fish-users] New version

2016-11-10 Thread Greg Reagle
On Thu, Nov 10, 2016, at 03:27, Lists wrote: > Thanks for that. I have always used deb files whenever possible, > thinking it the best way to go. If they are so unreliable, I wonder why > they are so prevalent. Perhaps they could be made more reliable. There is nothing unreliable about .deb

Re: [Fish-users] New version

2016-11-09 Thread Greg Reagle
On Wed, Nov 9, 2016, at 13:13, Lists wrote: > Since I normally use .deb files to add new packages whenever they are > available, I am surprised that you do not advise it. Don't be surprised. This is a bad idea, a bad practice. You are avoiding the vast majority of all the nice safety,

Re: [Fish-users] are you aware of any uses of the "block" command?

2016-11-02 Thread Greg Reagle
I've never used the block command. On Wed, Nov 2, 2016, at 02:23, Kurtis Rader wrote: > I'm still interested in anyone who can tell me about a use of the > `block` command. However, the bug I alluded to was the result of > addressing a lint warning about a missing "default" block in a switch >

Re: [Fish-users] About funced

2016-06-28 Thread Greg Reagle
Use nano. I know that nano works from personal experience. I don't know about atom. Use nano as a troubleshooting step. Report on whether it works, which will determine your next step. Simplify to troubleshoot. --

Re: [Fish-users] About funced

2016-06-28 Thread Greg Reagle
Funcsave On Tue, Jun 28, 2016, at 04:57 PM, Pito Salas wrote: > I have atom configured as my $EDITOR > > When I funced for example fish_prompt, it correctly launches > atom but the > edited function doesn’t seem to stick. Any thoughts on what I might be > doing incorrectly? Thanks! > > Pito >

Re: [Fish-users] echo -ne?

2016-06-27 Thread Greg Reagle
On 06/27/2016 09:58 PM, Greg Reagle wrote: > See > http://fishshell.com/docs/2.0/faq.html#faq-titlebar for how to disable > fish from automatically setting the title. Sorry for the link to the old docs. See http://fishshell.com/docs/current/faq.html#faq

Re: [Fish-users] echo -ne?

2016-06-27 Thread Greg Reagle
On 06/27/2016 09:44 PM, Kurtis Rader wrote: > On Mon, Jun 27, 2016 at 6:20 PM, Pito Salas > wrote: > > Is there a way to get the equivalent behavior of *echo -ne* in Fish? > > Here’s an example: > > echo -ne "\033];${PWD##*/}\007” > >

Re: [Fish-users] Newbie: overriding and using "built in functions" such as prompt_pwd and _fish_git_prompt

2016-06-27 Thread Greg Reagle
On 06/27/2016 06:25 PM, Pito Salas wrote: > I discovered a large collection of “built in functions” in > share/functions. If I want to change that behavior what’s the best > practice? Do I modify the ../share? I bet not. So what is recommended > if for example I want to have a variant of the

Re: [Fish-users] Newbie: Surprising command completion

2016-06-27 Thread Greg Reagle
On 06/27/2016 05:44 PM, Pito Salas wrote: > You’re right. And fish, version 2.3.0. > > So all the executables on the path are autosuggestions. Can one > control that at all? Greetings. Please read http://fishshell.com/docs/current/index.html#autosuggestions to understand how autosuggestions

Re: [Fish-users] Terminal Emulator

2015-12-30 Thread Greg Reagle
On Wed, Dec 30, 2015 at 11:08:07AM -0400, grondinm wrote: > Stupid question tho. What is the best/recommended terminal emulator to use > that will allow fish to change background and text color properly? Or does it > not even matter and it is a setting or something on my PC. I use >

Re: [Fish-users] Sane scripting?

2015-12-29 Thread Greg Reagle
On Tue, Dec 29, 2015 at 10:44:27AM +0100, Juan Simón wrote: > make install; or echo "error"; and echo "ok" > instead of > make install || echo "error" && echo "ok" This is for simplicity sake--see the law of orthogonality in the fish design document. Instead of having a special operator that

Re: [Fish-users] builtin 'which' implementation

2015-11-18 Thread Greg Reagle
On 11/18/2015 02:50 PM, Mike Costanzo wrote: > Hello, > > I am suggesting that fish be given a builtin implementation of the 'which' > command. > Currently it seems that it will just fall to the 'which' that is in the path > (if any). > > In csh / tcsh 'which' is a builtin that will tell you

Re: [Fish-users] polyglot of fish and bourne shell?

2015-10-05 Thread Greg Reagle
On 10/03/2015 02:05 PM, Michael Stillwell wrote: > However, I think it's more in keeping with the Unix philosophy to > specify the fish dependency in the #! line and let the shell > complain if it doesn't exist. I agree. First line of '#!/usr/bin/fish' communicates to both computer and human

[Fish-users] brackets in fish

2015-10-02 Thread Greg Reagle
I didn't find mention of this non-feature in the documentation or github issues, but maybe I missed something. In bash and dash, this will work grep function *.[ch] but it will not work in fish. Does fish have some sort of equivalent? Is there another way to achieve the same effect with an

Re: [Fish-users] brackets in fish

2015-10-02 Thread Greg Reagle
On 10/02/2015 11:01 AM, Glenn Jackman wrote: > The workaround is to use brace expansion > > grep function *.{c,h} Thank you! -- ___ Fish-users mailing list

[Fish-users] sbase: is od needed?

2015-09-28 Thread Greg Reagle
Howdy. Would it be useful for me to write od? Has anyone else worked on it? -- ___ Fish-users mailing list Fish-users@lists.sourceforge.net

Re: [Fish-users] How to use AND/OR in scripts?

2015-08-25 Thread Greg Reagle
On Tue, Aug 25, 2015, at 01:12 AM, Luciano ES wrote: As a side note, simple globbing (for i in *) returns the files only, not any directories. Is that by design? That's weird. Globbing should return files AND directories. When I do globbing (fish version 2.2.0), it returns files AND

Re: [Fish-users] How to use AND/OR in scripts?

2015-08-25 Thread Greg Reagle
On Tue, Aug 25, 2015, at 03:32 AM, Maxim Gonchar wrote: 3) Using 'test' command syntax: if test $i = . -o test $i = ..; end This is incorrect. When using the and (-a) and or (-o) operators of the test command, you do not repeat the 'test' command--you use it only once. For example: if test

Re: [Fish-users] Collections in fish

2015-08-19 Thread Greg Reagle
On 08/19/2015 12:08 PM, Rostislav Svoboda wrote: Hi, I'd like to create a collection and iterate over it. Something like: function zaz set listx ( foo bar zee ) for item in $listx echo item: $item end end but I cannot find any example how to do

Re: [Fish-users] Collections in fish

2015-08-19 Thread Greg Reagle
On 08/19/2015 12:18 PM, Rostislav Svoboda wrote: set listx foo bar baz; for item in $listx; echo item: $item; end ah :) thx BTW it would be great to put this example to the documentation. Could you do that? It is already documented. Look at the man page of for or

Re: [Fish-users] Vim binding for forward and backward search

2015-08-04 Thread Greg Reagle
I was wondering if there is any simple way to map ? and / to backward and forward history search à là vim in vim mode ? I combed the web and the doc, and could not find history backward and forward search. Hello. I'd like to help, but I am not a vi user (I worship in the Church of Emacs) and

Re: [Fish-users] Suspend?

2015-08-04 Thread Greg Reagle
On Tue, Aug 4, 2015, at 07:33 AM, Diego Zamboni wrote: Valid use cases, although for most of those I’d prefer something like tmux or screen. Or dvtm [1] and abduco [2] [1] http://www.brain-dump.org/projects/dvtm/ [2] http://www.brain-dump.org/projects/abduco/ -- http://www.fastmail.com - The

Re: [Fish-users] Suspend?

2015-08-04 Thread Greg Reagle
On Tue, Aug 4, 2015, at 04:28 AM, Mike Meyer wrote: And I just gave myself an idea for an implementation: function suspend if status --is-login echo cannot suspend login shell 2 else kill -STOP %self end end Brilliant. Thank you. I'm not a fish expert, so I

Re: [Fish-users] Suspend?

2015-08-03 Thread Greg Reagle
On Mon, Aug 3, 2015, at 04:19 PM, Mike Meyer wrote: There doesn't seem to be a way to suspend a fish shell, ala the suspend builtin in zsh, bash, etc. I'm wondering if this is a bug, and C-Z should work (except in a login shell), or if it's a design feature. or if no one has asked for it? I

Re: [Fish-users] fish for a bash user

2015-08-03 Thread Greg Reagle
On Sun, Aug 02, 2015 at 08:30:14PM -0600, @lbutlr wrote: That’s what i thought, but if I’m using bash and type % gbz text1 text2 I get results in the bz2 files for “text1 text2” while with fish I get: gbz text1 text2 bzip2: Can't open input file text2: No such file or directory.

Re: [Fish-users] fish for a bash user

2015-08-03 Thread Greg Reagle
On Mon, Aug 3, 2015, at 04:07 AM, Cedric Auger wrote: ​That is because it is expanded as: bzgrep -H text1 text2 [found_file] (That is: search text1 in files text2 and [found_file]) While you wanted is expanded as: bzgrep -H text1 text2 [found_file] I guess it is the reason why

Re: [Fish-users] fish for a bash user

2015-08-02 Thread Greg Reagle
On Sat, Aug 01, 2015 at 01:38:02PM -0600, @lbutlr wrote: I was hoping the list was more active FYI, the GitHub site at https://github.com/fish-shell/fish-shell/issues is very active with bug reports and feature requests. Anyway, is there any sort of writeup anyone’s done on something like

Re: [Fish-users] disown (bash,zsh) equivalent in fish

2015-07-14 Thread Greg Reagle
On Mon, Jul 13, 2015, at 03:55 PM, Johnny Bravo wrote: As subject says, I want a equivalent to disown (detaches a process from its parent) as found i bash and zsh in fish. Is there such a thing? Do you know about nohup or dtach [1] or abduco [2]? See Is there an equivalent of the 'disown'

Re: [Fish-users] disown (bash,zsh) equivalent in fish

2015-07-14 Thread Greg Reagle
On Tue, Jul 14, 2015, at 12:17 PM, David Frascone wrote: Cool trick! On Tue, Jul 14, 2015 at 9:40 AM, Johnny Bravo n...@ifixit.no wrote: To do this: Yea, very cool. I tried it (using different programs than irssi and screen because I don't know them) with fish and it worked, even without a

Re: [Fish-users] why fish man pages are only available in fish's man function

2015-05-12 Thread Greg Reagle
On Tue, May 12, 2015 at 04:12:02PM +, Sepp Tannhuber wrote: I didn't know that there are fish man pages at all. I use fish from github. I realized that it tries to installman pages from  share/man/man1But the directory doesn't exist. Do I miss anything? Hi Sepp. In order to get help,

[Fish-users] fish help for command line: 1. big man page 2. using elinks

2015-05-12 Thread Greg Reagle
Reading some of the comments to this list recently, I've been thinking about how to make getting help for fish more easy and convenient to users who like to stay on the command line, for example using man instead of a web browser. What about creating a man page with a name like fish-commands

[Fish-users] why fish man pages are only available in fish's man function

2015-05-12 Thread Greg Reagle
On Sat, May 09, 2015 at 11:11:07PM +0200, Beni Cherniavsky-Paskin wrote: Generally yes, but in this case it surfaced a nasty problem: `man` knows about fish commands because it's a function (`type man`); when you prepend it with /usr/bin/env, it executes /usr/bin/man which fails with the

[Fish-users] functions versus scripts

2015-05-12 Thread Greg Reagle
On Sat, May 09, 2015 at 11:11:07PM +0200, Beni Cherniavsky-Paskin wrote: This is a serious orthogonality fail. Similar things happen whenever functions are used. A lot of things fish uses functions for could better be written as scripts. (would require fish to prepend a dir with its scripts

Re: [Fish-users] 5 minutes fish from 15 years bash impression

2015-05-06 Thread Greg Reagle
On 05/06/2015 01:40 PM, Luciano ES wrote: Choosing 'less' as default pager is among the worst of our sins. There, I made a slogan for fish. And it took me less than five minutes. If choosing 'less' as the default pager is wrong, then I don't want to be right. :

Re: [Fish-users] Idiomatic way to test if command works (specifically `bind -M`)

2015-04-28 Thread Greg Reagle
On Sat, Apr 25, 2015, at 06:21 AM, Oliver Schrenk wrote: what is the best way to test if a command or rather a specific command option exists? Specifically I want to test if `bind -M` is supported by the current version of the shell. A suggestion: Test the version of fish (fish -v).

Re: [Fish-users] patch: Enable editing of command with $EDITOR

2015-04-16 Thread Greg Reagle
On Wed, Apr 15, 2015, at 04:19 PM, Mandeep Sandhu wrote: I think it'll be best if you send the patch via github, where others can review and give comments easily. I appreciate the advice. I created issue Enable fish to call $EDITOR on command line #2027 -- http://www.fastmail.com - Does

Re: [Fish-users] Edit command line in $EDITOR?

2015-04-15 Thread Greg Reagle
On 04/07/2015 03:38 AM, Gareth Skinner wrote: In bash, you can hit Ctrl-x-e to open your current command line in $EDITOR, make your modifications, and the shell runs your command when you exit. Thanks for pointing that out; I had no idea, even though I used bash for many years before

Re: [Fish-users] Edit command line in $EDITOR?

2015-04-15 Thread Greg Reagle
On 04/15/2015 11:45 AM, Sanne Wouda wrote: Greg, unfortunately, you cannot rewrite it like that. You have to put quotes around (cat $tmp), or each token will end up on its own line in the command buffer. I understand what you mean now, but this problem does not happen for me. Maybe the

Re: [Fish-users] Edit command line in $EDITOR?

2015-04-15 Thread Greg Reagle
On 04/15/2015 11:45 AM, Sanne Wouda wrote: Greg, unfortunately, you cannot rewrite it like that. You have to put quotes around (cat $tmp), or each token will end up on its own line in the command buffer. (And in fish, you cannot do command substitution inside quotes.) I don't understand.

[Fish-users] patch: Enable editing of command with $EDITOR

2015-04-15 Thread Greg Reagle
This is my first time trying to contribute to fish, so please forgive any mistakes I make. The patch is included as an attachment and Sanne Wouda sanne.wo...@gmail.com wrote this function which I changed a little. From 64af63b71f2bbf168a6e833390e72b5e04d27b66 Mon Sep 17 00:00:00 2001 From: Greg

Re: [Fish-users] command substitution into one word

2015-03-26 Thread Greg Reagle
On Thu, Mar 26, 2015, at 01:07 PM, Elias Assmann wrote: On 03/26/2015 03:51 PM, Greg Reagle wrote: How does this work? svnlist | xargs -0 svn ps svn:ignore That is a neat idea, but in this case it does not work like that because ‘svn propset’ wants the property value first. From

Re: [Fish-users] Remove path from $fish_user_paths

2015-03-02 Thread Greg Reagle
On Mon, Mar 2, 2015, at 12:17 PM, Ryan Burnett wrote: set -e $fish_user_paths[1] ...I get this error: set: Erase needs a variable name Lose the dollar sign: set -e fish_user_paths[1] Look at the examples in 'man set'. When you use the dollar sign it dereferences the variable, i.e.

Re: [Fish-users] Adding export command to fish

2015-02-20 Thread Greg Reagle
On Fri, Feb 20, 2015, at 02:34 PM, Ryan Burnett wrote: How would I add the following .bash-profile command to fish? export JAVA_HOME=$(/usr/libexec/java_home) Add the following to ~/.config/fish/config.fish: set -x JAVA_HOME (/usr/libexec/java_home) -- http://www.fastmail.com - Access all

Re: [Fish-users] Running a shell in Vim

2015-02-10 Thread Greg Reagle
On my system, Ubuntu 14.04 with fish as my default shell, I get the same problem. The problem can be reproduced with a much simpler vim command :r! ls. I can work around the problem with the following (fish command) env SHELL=/bin/bash vim FYI, on my system, my default shell is set by the

Re: [Fish-users] Running a shell in Vim

2015-02-10 Thread Greg Reagle
On Mon, Feb 9, 2015, at 11:17 PM, Luciano ES wrote: There is this command I like to run a lot: :r! sed '/pattern/\!d' /home/luc/db/info.txt It used to work fine, but now I get this error: fish: Illegal command name (sed '/pattern/\!d' /home/luc/db/info.txt) Standard input: (sed

Re: [Fish-users] Running a shell in Vim

2015-02-10 Thread Greg Reagle
On Tue, Feb 10, 2015, at 12:09 PM, Luciano ES wrote: Hi, Greg. I followed your advice and found a permanent fix: this line in my config.fish file: set SHELL /bin/bash I don't know whether that is a good idea. That will make *every* program (that looks at the SHELL environment variable) use

Re: [Fish-users] Running a shell in Vim

2015-02-10 Thread Greg Reagle
On Tue, Feb 10, 2015, at 12:32 PM, Glenn Jackman wrote: I have in my ~/.vimrc: set shell=sh That looks like the perfect solution, if it works. I am not a vi/vim user myself, so I didn't know about this option. (I worship at the Church Of Emacs, http://www.churchofemacs.org/) --

Re: [Fish-users] eval command in config.fish

2014-11-19 Thread Greg Reagle
On 11/19/2014 03:26 PM, Ryan Burnett wrote: It shows bash-style output (export...). I'm running rbenv 2.1.4. Fish is not Bourne shell compatible. rbenv is producing Bourne shell code. -- Download BIRT iHub F-Type -

Re: [Fish-users] Problem with -n in a conditional statement

2014-11-11 Thread Greg Reagle
That's very interesting. I get the same problem. I don't think anything is wrong with your code. I think something fishy is going on with fish, but I don't know what. It looks like it might even be a bug in fish. I would expect test -n to be the opposite of test -z, but that is not true

[Fish-users] Fwd: Re: Problem with -n in a conditional statement

2014-11-11 Thread Greg Reagle
Forgot to send to the list. - Original message - From: Greg Reagle greg.rea...@umbc.edu To: Marcin Zajączkowski msz...@wp.pl Subject: Re: [Fish-users] Problem with -n in a conditional statement Date: Tue, 11 Nov 2014 17:44:37 -0500 On Tue, Nov 11, 2014, at 05:29 PM, Marcin Zajączkowski

Re: [Fish-users] Setting true/false to a variable

2014-11-11 Thread Greg Reagle
On Tue, Nov 11, 2014, at 05:45 PM, Marcin Zajączkowski wrote: Another question related to fish scripting. How can I set a value to a variable to be able to use it in `if`? if test $myBool ... end The shell's only notion of true and false (this is true for all unix shells that I know) is

Re: [Fish-users] Fwd: Re: Problem with -n in a conditional statement

2014-11-11 Thread Greg Reagle
Well I was totally wrong here. Of course this is not a bug in fish or the man page, it is my mistake. I shouldn't have used the dollar sign in set -q. Here is corrected code: if set -q COLUMNS LINES; echo both defined; end On Tue, Nov 11, 2014, at 05:45 PM, Greg Reagle wrote: Forgot

Re: [Fish-users] Problem with -n in a conditional statement

2014-11-11 Thread Greg Reagle
On Tue, Nov 11, 2014, at 05:51 PM, Glenn Jackman wrote: I suspect what is happening (this is true in bash, I'm speculating about fish) is that an unset variable is substituted with nothing (not the empty string, but with nothing). Then the `test` command receives exactly one argument: -n.

Re: [Fish-users] Putting a series of commands in the background

2014-11-05 Thread Greg Reagle
On 11/05/2014 01:53 PM, Siteshwar wrote: If you fork a new fish process it will have different environment then it's parent process for e.g. local and global variables which are not exported are not available to new fish process. So this approach may or may not work depending on user

  1   2   >