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

2018-06-11 Thread Robert Carpenter
A year or so ago on this list, there was a lot of chatter about this doc: 
https://mvolkmann.github.io/fish-article/



> On Jun 11, 2018, at 15:46, Jesse Atkinson  wrote:
> 
> Signed PGP part
> This is an awesome idea and something I think that Fish shell needs.  It's 
> often hard to easily convince people of its merits.  Not until they work with 
> it for awhile.
> 
> On 06/11, Robert O. wrote:
>> Hi all,
>> I am Rob from Hungary. It’s good to be here among you Fishers :)
>> I have been a Fish user for a couple years now, it’s my choice on Mac OS, 
>> Arch, and on numerous VPN and VPS boxes, wherever terminal access is a must.
>> 
>> I won’t bore you with my reasons, I believe everyone who is here knows most 
>> of them, and ‘because Fish is pure awesome’ really sums it up, anyway.
>> 
>> Apart from my introduction, I’m also writing to ask the Fish community 
>> whether there is any interest in an ebook about the shell.
>> 
>> I’m planning to write a somewhat lengthy book, explaining Fish’s features in 
>> more detail, as well as giving handy tips for daily use.
>> I am also hoping to feature a cookbook section, with ready-to-use scripts, 
>> solutions to possible issues (e.g. things to look out for when porting Bash 
>> scripts to Fish, debugging scripts, etc).
>> Any input on this is welcome, in case of scripts or examples, with proper 
>> credit, of course.
>> 
>> Cheers,
>> Rob
> 
> 
> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> 
>> ___
>> Fish-users mailing list
>> Fish-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/fish-users
> 
> 
> 



signature.asc
Description: Message signed with OpenPGP
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] expr command

2017-10-23 Thread Robert Carpenter
Mark,

Good question. expr is a system command, so it's documented through the usual 
routes: https://linux.die.net/man/1/expr

Robert

> On Oct 23, 2017, at 07:50, Mark Volkmann  wrote:
> 
> What is the reason why the expr command is not documentation along with other 
> fish commands at https://fishshell.com/docs/current/commands.html. Is it 
> considered to be in a different category of commands from those?
> 
> -- 
> R. Mark Volkmann
> Object Computing, Inc.
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! 
> http://sdm.link/slashdot___
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] dirh numbers

2017-10-20 Thread Robert Carpenter
Hey Mark,

Check out http://fishshell.com/docs/current/commands.html#prevd . I think 
that'll do what you're looking for.

Robert

> On Oct 20, 2017, at 11:36, Mark Volkmann  wrote:
> 
> dirh outputs a list of up the 25 of the past directories I've been in.
> Entries in the list are numbered.
> Is there a way to ask to cd to the directory of an entry by its number?
> 
> -- 
> R. Mark Volkmann
> Object Computing, Inc.
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! 
> http://sdm.link/slashdot___
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] fish_prompt.fish not getting called

2017-09-30 Thread Robert Carpenter
Hey Mark,

I've seen this too, and I spent some time digging around in the source today 
and I don't think there is a way around it: 
https://github.com/fish-shell/fish-shell/blob/cb352317bdd421d140771de62c23ee3c32138502/src/screen.cpp#L956-L961

Someone can correct me if I'm wrong here, but I believe the goal here is for 
fish to present something usable in all situations and when the prompt is too 
long, usability starts to decrease rapidly. 

Robert

> On Sep 30, 2017, at 13:59, Mark Volkmann  wrote:
> 
> Perhaps my function is getting called, but fish becomes convinced that my 
> prompt won't fit and so it just outputs "> ". I'm trying to manage that by 
> outputting a multi-line prompt where each line I output does fit, but I 
> suspect fish thinks I'm trying to output everything on a single line. Is 
> there another approach I can take to creating a multi-line prompt?
> 
> On Sat, Sep 30, 2017 at 2:33 PM, Mark Volkmann  
> wrote:
> I have defined a custom fish prompt that works great most of the time. I have 
> verified that it works when $COLUMNS is >= 57 or $COLUMNS is between 20 and 
> 47. However, my fish_prompt function doesn't even get called if $COLUMNS is 
> 52. Any idea what could cause that?
> 
> My code is at 
> https://github.com/mvolkmann/MyUnixEnv/blob/master/.config/fish/functions/fish_prompt.fish.
> 
> -- 
> R. Mark Volkmann
> Object Computing, Inc.
> 
> 
> 
> -- 
> R. Mark Volkmann
> Object Computing, Inc.
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! 
> http://sdm.link/slashdot___
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] how do I delete the fish shell history ?

2017-08-09 Thread Robert Carpenter
history clear 

sounds to me like it would do the trick based on this:

https://fishshell.com/docs/current/commands.html#history

> • clear clears the history file. A prompt is displayed before the history is 
> erased asking you to confirm you really want to clear all history unless 
> builtin history is used.

Robert

> On Aug 9, 2017, at 15:42, Luis Manuel Sánchez  
> wrote:
> 
> Would like to reset the history. 
> 
> thanks,
> Luis.
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! 
> http://sdm.link/slashdot___
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] Print and update information below commandline?

2015-10-07 Thread Robert Carpenter
Hey Jakob,

I thought I'd chime in with the implementation I have running, just for the 
sake of completion:

fish -v
fish, version 2.1.2-1228-g89da096

.config/fish/functions/expand-dot-to-parent-directory-path.fish :

function expand-dot-to-parent-directory-path -d 'expand ... to ../.. etc'
# Get commandline up to cursor
set -l cmd (commandline --cut-at-cursor)

# Match last line
switch $cmd[-1]
case '*..'
commandline --insert '/..'
case '*'
commandline --insert '.'
end
end

.config/fish/config.fish :

function fish_user_key_bindings
  bind . 'expand-dot-to-parent-directory-path'
end

Now, mine also doesn't have the second line preview that you mentioned, but I 
thought it might be helpful to show another way to accomplish the period 
expansion.

I have a hunch that the complete command might be able to do what is needed, 
but I haven't looked into it.

> On Oct 7, 2015, at 05:47, Jakob Pfender  wrote:
> 
> Hello,
> 
> I recently switched from zsh to fish and am currently trying to port my
> version of Mikael Magnusson's rationalise-dot to fish. The basic
> functionality (automatically expanding each '.' after an initial '..' to
> a new '/..') is fairly straightforward and probably known to most of
> you:
> 
> function rationalise_dot
>   if commandline -t | sgrep -q '\(^\|/\)\.\.$'
>   commandline -i /..
>   else
>   commandline -i .
> end
> end
> 
> function fish_user_key_bindings
>   bind . rationalise_dot
> end
> 
> However, my version had another feature that I find extremely handy: It
> displays the path that the current '../../.. etc' expands to beneath the
> commandline, like this:
> 
> $ cd /a/b/c/d/e
> $ cd ../
> /a/b/c/d  <- this is automatically displayed below the
>  commandline, not the output of the cd command
> $ cd ../../
> /a/b/c/   <- ditto
> 
> And so on. The zsh code looks like this:
> 
> rationalise-dot() {
>   local MATCH dir split
>   split=(${(z)LBUFFER})
>   if (( $#split > 1 )); then
>   dir=$split[-1]
>   else
>   dir=$split
>   fi
>   if [[ $LBUFFER =~ '(^|/| | |'$'\n''|\||;|&)\.\./$' ]]; then
>   zle self-insert
>   zle self-insert
>   LBUFFER+=/
>   [[ -e $dir ]] && zle -M $dir(:a:h)
>   elif [[ $LBUFFER[-1] == '.' ]]; then
>   zle self-insert
>   LBUFFER+=/
>   [[ -e $dir ]] && zle -M $dir(:a:h)
>   else
>   zle self-insert
>   fi
> }
> 
> Is there a way to get this functionality in fish? Autocomplete
> suggestions in fish are already displayed in a similar fashion, but as
> far as I can tell, this is a core functionality of fish and the ability
> to display arbitrary information below the commandline is not exposed as
> a callable function. Or am I mistaken?
> 
> This is obviously a minor quibble but I would appreciate it if someone
> had suggestions as to how to go about implementing it.
> 
> Best regards
> 
> --
> Full-scale, agent-less Infrastructure Monitoring from a single dashboard
> Integrate with 40+ ManageEngine ITSM Solutions for complete visibility
> Physical-Virtual-Cloud Infrastructure monitoring from one console
> Real user monitoring with APM Insights and performance trend reports 
> Learn More http://pubads.g.doubleclick.net/gampad/clk?id=247754911=/4140
> ___
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users

--
Full-scale, agent-less Infrastructure Monitoring from a single dashboard
Integrate with 40+ ManageEngine ITSM Solutions for complete visibility
Physical-Virtual-Cloud Infrastructure monitoring from one console
Real user monitoring with APM Insights and performance trend reports 
Learn More http://pubads.g.doubleclick.net/gampad/clk?id=247754911=/4140___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


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

2015-05-07 Thread Robert Carpenter
Aleksey,

I honestly can't decide if you're trying to troll the mailing list or if you 
have legitimate questions. I'm going to take a risk of feeding the troll here 
in hopes that you're actually, honestly trying to understand fish-shell.

To save yourself some time, I'll put the summation at the top. Continue reading 
if you wish. 

To sum up: Fish shell is not bash. It tries to do things better. Sometimes that 
means different. It takes some getting used to.

And now a little more:

Several of the features you've suggested could be helpful, but I think it is 
important to remember that fish-shell is not, nor does it try (or even want) to 
be bash or even bash compliant. The interaction is *necessarily* different.

In my experience, bash is different, but equally frustrating when looking for 
help on builtins:

When I run `man for`, I get a man page or BUILTIN(1)...which lists all the 
builtin commands, does absolutely nothing to explain the behavior of the 'for' 
command, and (perhaps more importantly) doesn't suggest any further recourse 
for understanding what I am curious about.

Now, perhaps I'm missing some subtlety about bash -- I used it recklessly for 
about 8 years without ever learning much about it. But the principle of 
discoverability is completely missing from that experience. 

`env NAME=value command` is a perfectly acceptable system. It is *different*. 
But it is different for good reasons. It is more obvious to the user, less 
ambiguous to the interpreter, and obeys the principals of consistency, 
composition, and modularity (env is a command, which sets an environment 
variable, and then runs a given argument in the altered environment). These 
rules and others are available on the wikipedia page for the Unix Philosophy[1].

As for fetching help on every command when you make an error, that is actually 
the principal of discoverability at work. It is the default paradigm for any 
well designed shell tool, why should the shell itself be different? If you find 
yourself wanting examples, have a look at ssh, cp, and scp. 

I'll admit, when I first started using fish-shell, I was frustrated by the fact 
that help opened the browser by default. But my workflow is frequently 
switching back and forth between the shell and chrome (read: stackoverflow). 
Why not provide a richer help experience, where related commands can be easily 
found, rich on page searching is still available (and probably better)? I 
honestly do think that fish could use a better help experience, but I also 
don't think your method of requesting it is helpful at all.

Robert

[1] http://en.wikipedia.org/wiki/Unix_philosophy

 On May 5, 2015, at 10:03, Aleksey Midenkov mide...@gmail.com wrote:
 
 On Tue, May 5, 2015 at 3:01 PM, Siteshwar sitesh...@gmail.com wrote:
 Hello Aleksey,
 
 Thanks for trying fish.
 
 On Tue, May 5, 2015 at 4:31 PM, Aleksey Midenkov midenok+f...@gmail.com
 wrote:
 
 help for
 
 It opened browser window... I don't need browser, I need quick and
 easy way to access basic syntax what does inline help in bash. It's
 console app after all!
 
 man for
 
 Not really good: the default PAGER is 'less' which doesn't fully
 comply with 'quick and easy'. Well, if to trim NAME section and quick
 description ('for - perform a set of commands multiple times.') and
 output with 'cat' it will be almost like 'help' in bash, but:
 
 PAGER=cat man for
 fish: Unknown command 'PAGER=cat'. Did you mean to run man with a
 modified environment? Try 'env PAGER=cat man…'. See
 the help section on the set command by typing 'help set'.
 
 I recall, that I've read something about fish doesn't like
 subshells. Well, it's good to set variables inside pipes: I like
 that! But, here I want quick and easy way to use temporary settings.
 Ok, let's try what error said:
 
 env PAGER=cat man for
 No manual entry for for
 
 
 OMG, what was that?? It set PAGER and forgot all other variables? I
 guess, it executed '/usr/bin/env' which is not related to any shell
 and behaves how it wants, thus not a good method. I just want a
 subshell here with a quick and concise:
 
 PAGER=cat man for
 
 And it is kind of cumbersome to add 'env' here (even if it worked)...
 
 
 It's rather simple. Just type 'for' and press enter to see help text .
 
 Seriously? Making errors just to get inline help is not the right way
 to do it. It will not work for all commands (f.ex. 'set' and 'echo').
 Moreover, I don't need inline help every time I make real mistake,
 obviously...
 
 I see, that command built-ins have '--help' option. This is not unified way:
 
 1. no '--help' for syntactic statements like 'for', 'if'.
 2. With '--help' there is no clarity that this is sure built-in  When
 I type 'help COMMAND' I am sure that this is help about built-in. When
 I type 'COMMAND --help' I'm not sure if this is built-in or not (maybe
 there is no such built-in and this is help about executable util).
 
 
 
 Btw, if someone is interested, I decided to look at 'fish' 

Re: [Fish-users] Change default path from ~/ to ~/Sites

2014-06-18 Thread Robert Carpenter
In the past, my approach to this has been to just define an alias something 
along the lines of:

alias scd cd ~/Sites

At times, I've also taken the approach of instructing whatever Terminal app I'm 
using at the time to just start in whatever directory is occupying most of my 
time.

You may also be interested in $CDPATH. From 
fishshell.com/docs/current/commands.html#cd :

 If DIRECTORY is a relative path, the paths found in the CDPATH environment 
 variable array will be tried as prefixes for the specified path.

It is *possible* that setting $HOME will get you what you want, but I'd be 
pretty reluctant to do that because of how many different ways $HOME is 
usedyou'll likely end up with all manner of nonsense dotfiles in your Sites 
folder.

Robert


On Jun 18, 2014, at 7:17, Ryan Burnett ryanjburn...@gmail.com wrote:

 @David
 
 I'm trying to change my staring path from ~/ to ~/Sites (i.e. so I don't have 
 to cd Sites each time).
 
 @Maher
 
 I added the -x flag but Terminal's still starting at ~/
 
 if status --is-login
   set -x PATH $PATH ~/Sites
 end
 
 How can I change my staring path to ~/Sites?
 
 
 On Wed, Jun 18, 2014 at 1:58 AM, ماهر الخطيب maher@gmail.com wrote:
 use the set option: -x
 
 
 On Tue, Jun 17, 2014 at 10:21 PM, Ryan Burnett ryanjburn...@gmail.com wrote:
 I'm having trouble changing my default shell path from ~/ to ~/Sites.
 
 I've added this to ~/.config/fish/config.fish
 
 if status --is-login
   set PATH $PATH ~/Sites
 end
 
 Any idea what I'm doing wrong?
 
 P.S. I'm running OS X 10.9.3 and fish 2.1.
 
 --
 HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
 Find What Matters Most in Your Big Data with HPCC Systems
 Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
 Leverages Graph Analysis for Fast Processing  Easy Data Exploration
 http://p.sf.net/sfu/hpccsystems
 ___
 Fish-users mailing list
 Fish-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/fish-users
 
 
 
 
 -- 
 
 
 --
 HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
 Find What Matters Most in Your Big Data with HPCC Systems
 Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
 Leverages Graph Analysis for Fast Processing  Easy Data Exploration
 http://p.sf.net/sfu/hpccsystems___
 Fish-users mailing list
 Fish-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/fish-users


--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing  Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] Creating a ramdisk with fish ?

2014-02-23 Thread Robert Carpenter
Yvon,

Backticks are indeed the problem. Simply swap them out for parentheses and
it should work as expected:

diskutil erasevolume HFS+ Ram Disk (hdiutil attach -nomount ram://204800)

Robert


On Sun, Feb 23, 2014 at 10:34 AM, Yvon Thoraval yvon.thora...@gmail.comwrote:

 With shell fish i get :

 .-[yt@iMac.local:~/Downloads][18:23:13]




 '-$ diskutil erasevolume HFS+ Ram Disk `hdiutil attach -nomount
 ram://204800`

 Unable to find disk for `hdiutil

 .-[yt@iMac.local:~/Downloads][18:32:34]




 '-$


 Switching to sh works :

 .-[yt@iMac.local:~/Downloads][17:55:51]




 '-$ sh

 sh-3.2$ diskutil erasevolume HFS+ Ram Disk `hdiutil attach -nomount
 ram://204800`

 Started erase on disk3

 Unmounting disk

 Erasing

 Initialized /dev/rdisk3 as a 100 MB case-insensitive HFS Plus volume

 Mounting disk

 Finished erase on disk3 Ram Disk

 sh-3.2$ exit

 exit

 .-[yt@iMac.local:~/Downloads][18:10:46]




 '-$


 What should I avoid with fish ?

 th backticks ` ???

 --
 Yvon@48.871651804,2.384858688



 --
 Managing the Performance of Cloud-Based Applications
 Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
 Read the Whitepaper.

 http://pubads.g.doubleclick.net/gampad/clk?id=121054471iu=/4140/ostg.clktrk
 ___
 Fish-users mailing list
 Fish-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/fish-users


--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471iu=/4140/ostg.clktrk___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


[Fish-users] Control key to accept part of a command completion suggestion?

2013-12-03 Thread Robert Carpenter
Hi fish-users,

I've been running a lot of similar commands lately and I've been really
grateful for the fish command suggestion feature. One thing I've come
across is a situation where I only want to take the next word or two from
the suggestion and then finish the command differently from the way fish
suggested.

As an example, if the command history contains:

ssh robert@server 'ls /home'

then when I type 'ssh' the suggestion will be the full command. If I
instead want to run `ssh robert@server 'ls /etc'` I can either type out the
full command or accept the full completion and ^W back over a few words to
put in what I want.

I am thinking that it would be useful for me to have a complete next word
key, which would take the completion up to some token marker (whitespace or
quote or whatever makes sense here). Then my input strategy would be more
like this:

- type ssh, see suggestion for `ssh robert@server 'ls /home'`
- ^G to take 'robert@server'
- type the rest of the command manually

Thoughts?
--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351iu=/4140/ostg.clktrk___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] Control key to accept part of a command completion suggestion?

2013-12-03 Thread Robert Carpenter
Okay. That isn't documented anywhere I can find, even now that I know what
it is. Before sending this I checked the Autosuggestion sections under both
Tutorial and Documentation. I was trying to be helpful suggesting a feature
that didn't exist.

It took some fiddling around to sort out what you were talking about
because I don't use the arrow keys to accept the completion in favor of
ctrl+f. I thought you were referring to opt+f or opt+ctrl+f instead of
opt+right.

I just spent some time looking into what tool builds the documentation so I
can submit a pull request for the docs to include this information but
decided I was walking down the wrong path when I was reading the makefile.
What toolset is used to generate the html docs from doc_src files?



On Tue, Dec 3, 2013 at 11:35 AM, Andrew Kreps andrew.kr...@gmail.comwrote:

 Try using the option key.  It's already implemented.

 On Tue, Dec 3, 2013 at 9:47 AM, Robert Carpenter rob...@robacarp.com
 wrote:
  Hi fish-users,
 
  I've been running a lot of similar commands lately and I've been really
  grateful for the fish command suggestion feature. One thing I've come
 across
  is a situation where I only want to take the next word or two from the
  suggestion and then finish the command differently from the way fish
  suggested.
 
  As an example, if the command history contains:
 
  ssh robert@server 'ls /home'
 
  then when I type 'ssh' the suggestion will be the full command. If I
 instead
  want to run `ssh robert@server 'ls /etc'` I can either type out the full
  command or accept the full completion and ^W back over a few words to
 put in
  what I want.
 
  I am thinking that it would be useful for me to have a complete next
 word
  key, which would take the completion up to some token marker (whitespace
 or
  quote or whatever makes sense here). Then my input strategy would be more
  like this:
 
  - type ssh, see suggestion for `ssh robert@server 'ls /home'`
  - ^G to take 'robert@server'
  - type the rest of the command manually
 
  Thoughts?
 
 
 --
  Rapidly troubleshoot problems before they affect your business. Most IT
  organizations don't have a clear picture of how application performance
  affects their revenue. With AppDynamics, you get 100% visibility into
 your
  Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics
  Pro!
 
 http://pubads.g.doubleclick.net/gampad/clk?id=84349351iu=/4140/ostg.clktrk
  ___
  Fish-users mailing list
  Fish-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/fish-users
 

--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] Proper way to put /usr/local/bin before /usr/bin/ in $PATH

2013-08-22 Thread Robert Carpenter
Hey Jesse,

I ran into the exact same problem a few months ago. A friendly fish user
suggested I explicitly set my path in config.fish and that has worked. The
line in my ~/.config/fish/config.fish file is:

set -x PATH /usr/local/bin /usr/bin /bin /usr/local/sbin /usr/sbin /sbin

I'm sure there are drawbacks to this method, but it has worked for me for a
few months now.

Cheers
Robert


On Thu, Aug 22, 2013 at 9:42 PM, Jesse Atkinson jesse.atkin...@me.comwrote:

 There's been a lot of discussion of how to properly set $PATH.
 $fish_user_paths works but only if you want to append to the $PATH. I use
 Homebrew to keep git, MySql, and many other formula's up-to-date. If I add
 /usr/local/bin/ to $fish_user_paths it appends and Fish still uses the git
 version located in /usr/bin/ which is the OS X default installed and
 out-of-date version.

 What's the proper way to prepend to $PATH so that your Homebrew formulas
 take precedence?

 —
 Jesse Atkinson
 jesse.atkin...@me.com



 --
 Introducing Performance Central, a new site from SourceForge and
 AppDynamics. Performance Central is your source for news, insights,
 analysis and resources for efficient Application Performance Management.
 Visit us today!
 http://pubads.g.doubleclick.net/gampad/clk?id=48897511iu=/4140/ostg.clktrk
 ___
 Fish-users mailing list
 Fish-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/fish-users


--
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511iu=/4140/ostg.clktrk___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


[Fish-users] Rearranging my $PATH

2013-07-04 Thread Robert Carpenter
Hey Fish Users,

My $PATH has the following: /usr/bin /bin /usr/sbin /sbin /usr/local/bin

I've recently upgraded my git, and homebrew links it into /usr/local/bin,
but the system git, which is installed in /usr/bin is still activated when
I execute a git command. Homebrew has been warning me about this for ages
but it hasn't ever really bit me until now.

From searching around the fish-shell issues on github, I gather that this
part of the path is generated from /etc/path somewhere along the startup
sequence. Config files or fish env functions then either add to the
beginning or end of the path depending on what it needs.

I opened up /etc/path and rearranged the items in there, exited all
instances of fish, and reopened a terminal to find that nothing had
changed.  My path still places /usr/local/bin at the end of the path,
rather than the beginning.

Whats the trick?

Thanks
Robert
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] “fg -”

2013-06-20 Thread Robert Carpenter
Elias,

I do this all the time under fish and have no problem. ^z to background a
running task, `jobs` to see what is running, `fg` or `fg N` to bring
something forward.  It even works with the `command ` syntax to background
a job at command time.

Robert


On Thu, Jun 20, 2013 at 10:19 AM, Elias Assmann elias.assm...@gmail.comwrote:

 Hi,

 In bash, I regularly use the “fg -” shortcut (it means switch to
 “previous job“, while “fg +” means “current job”).  It is handy for
 alternating between two jobs.

 As far as I can see, fish's “fg” cannot do this, or am I missing
 something?  If not, are there any plans to support this particular
 “bashism“ in fish?


 Elias


 --
 This SF.net email is sponsored by Windows:

 Build for Windows Store.

 http://p.sf.net/sfu/windows-dev2dev
 ___
 Fish-users mailing list
 Fish-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/fish-users

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] Fish version of [[?

2013-06-16 Thread Robert Carpenter
Hey Robert,

The fish replacement for [[ is test. See the docs here:
http://fishshell.com/docs/2.0/commands.html#test

For your specific application, you might get some mileage out of contains (
http://fishshell.com/docs/2.0/commands.html#contains ) or case (
http://fishshell.com/docs/2.0/commands.html#case )

Hope this helps


On Sun, Jun 16, 2013 at 11:49 AM, Robert O'Connell spamed...@gmail.comwrote:

 I want to compare a string with a wildcard, as in [[ $1 == *.tar.gz ]]
 How can I match strings with wildcards?


 --
 This SF.net email is sponsored by Windows:

 Build for Windows Store.

 http://p.sf.net/sfu/windows-dev2dev
 ___
 Fish-users mailing list
 Fish-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/fish-users


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] aliasing pushd

2013-05-22 Thread Robert Carpenter
On Wed, May 22, 2013 at 1:55 AM, dag.odenh...@gmail.com 
dag.odenh...@gmail.com wrote:

 Torsten: `command` runs programs, and `command cd` won't change the cwd in
 fish. You'd need `builtin cd` to get the fish builtin, side-stepping the cd
 function. But see below.

 Robert: You may be using `builtin cd`, which doesn't log directory
 history. What does `type cd` say?


Good thought, but I don't think so:

rob ~ type cd
cd is a function with definition

function cd --description 'Change working directory'
builtin cd $argv
  emit cwd
end

rob ~

I had a similar thought and went down this path in the past, I think.  Any
other ideas?

Thanks


 On Tue, May 21, 2013 at 5:25 PM, Robert Carpenter rob...@robacarp.comwrote:

 I've been meaning to look into this for months now, but haven't gotten
 around to it.

 I'm either totally misunderstanding the directory history or mine is
 broken:

 rob ~ dirh
 /Users/rob
 rob ~ ./Desktop
 rob ~/Desktop dirh
 /Users/rob/Desktop
 rob ~/Desktop

 The only thing I can think of that might have altered this behavior is
 that I have a function listening to the cwd event.

 How should I go about sorting this?

 Thanks
 Robert


 On Tue, May 21, 2013 at 7:58 AM, Torsten Grust 
 torsten.gr...@uni-tuebingen.de wrote:

 On 21 May 2013, at 14:47, John Chludzinski wrote (with possible
 deletions):
  When using ksh or bash I typically alias cd to pushd.  When I do that
 in my
  config.fish file I get an infinite recursion of cd calling pushd
 calling cd
  calling pushd calling ...

 You may find 'command' helpful in such situations:

 http://fishshell.com/docs/2.0/commands.html#command

 'command cd' will execute fish's built-in 'cd', regardless of any
 function
 of the same name.

 Happy fishing,
--Torsten

 --
 | Prof. Dr. Torsten Grust
 | Database Systems — Universität Tübingen (Germany)
 | torsten.gr...@uni-tuebingen.de
 | db.inf.uni-tuebingen.de


 --
 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




 --
 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



--
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


Re: [Fish-users] aliasing pushd

2013-05-22 Thread Robert Carpenter
Welp, there it is. I feel silly.  It is working now.   I had just assumed
that function was the fish builtin.  I see that the fish version is much
more elaborate.

Thanks, Dag!


On Wed, May 22, 2013 at 11:40 AM, dag.odenh...@gmail.com 
dag.odenh...@gmail.com wrote:

 That there *is* calling `builtin cd`!  I suggest removing it (presumably
 you have that in ~/.config/fish/functions/cd.fish or something like that)
 so the one that ships with fish is used instead, and then use a variable
 listener function instead of a cwd event:

 function on_new_cwd -v PWD
 echo new cwd is $PWD
 end



 On Wed, May 22, 2013 at 4:01 PM, Robert Carpenter rob...@robacarp.comwrote:

 On Wed, May 22, 2013 at 1:55 AM, dag.odenh...@gmail.com 
 dag.odenh...@gmail.com wrote:

  Torsten: `command` runs programs, and `command cd` won't change the
 cwd in fish. You'd need `builtin cd` to get the fish builtin, side-stepping
 the cd function. But see below.

 Robert: You may be using `builtin cd`, which doesn't log directory
 history. What does `type cd` say?


 Good thought, but I don't think so:

 rob ~ type cd
 cd is a function with definition

 function cd --description 'Change working directory'
 builtin cd $argv
   emit cwd
 end

 rob ~

 I had a similar thought and went down this path in the past, I think.
  Any other ideas?

 Thanks


 On Tue, May 21, 2013 at 5:25 PM, Robert Carpenter 
 rob...@robacarp.comwrote:

 I've been meaning to look into this for months now, but haven't gotten
 around to it.

 I'm either totally misunderstanding the directory history or mine is
 broken:

 rob ~ dirh
 /Users/rob
 rob ~ ./Desktop
 rob ~/Desktop dirh
 /Users/rob/Desktop
 rob ~/Desktop

 The only thing I can think of that might have altered this behavior is
 that I have a function listening to the cwd event.

 How should I go about sorting this?

 Thanks
 Robert


 On Tue, May 21, 2013 at 7:58 AM, Torsten Grust 
 torsten.gr...@uni-tuebingen.de wrote:

 On 21 May 2013, at 14:47, John Chludzinski wrote (with possible
 deletions):
  When using ksh or bash I typically alias cd to pushd.  When I do
 that in my
  config.fish file I get an infinite recursion of cd calling pushd
 calling cd
  calling pushd calling ...

 You may find 'command' helpful in such situations:

 http://fishshell.com/docs/2.0/commands.html#command

 'command cd' will execute fish's built-in 'cd', regardless of any
 function
 of the same name.

 Happy fishing,
--Torsten

 --
 | Prof. Dr. Torsten Grust
 | Database Systems — Universität Tübingen (Germany)
 | torsten.gr...@uni-tuebingen.de
 | db.inf.uni-tuebingen.de


 --
 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




 --
 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





--
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


Re: [Fish-users] aliasing pushd

2013-05-21 Thread Robert Carpenter
I've been meaning to look into this for months now, but haven't gotten
around to it.

I'm either totally misunderstanding the directory history or mine is broken:

rob ~ dirh
/Users/rob
rob ~ ./Desktop
rob ~/Desktop dirh
/Users/rob/Desktop
rob ~/Desktop

The only thing I can think of that might have altered this behavior is that
I have a function listening to the cwd event.

How should I go about sorting this?

Thanks
Robert


On Tue, May 21, 2013 at 7:58 AM, Torsten Grust 
torsten.gr...@uni-tuebingen.de wrote:

 On 21 May 2013, at 14:47, John Chludzinski wrote (with possible deletions):
  When using ksh or bash I typically alias cd to pushd.  When I do that in
 my
  config.fish file I get an infinite recursion of cd calling pushd calling
 cd
  calling pushd calling ...

 You may find 'command' helpful in such situations:

 http://fishshell.com/docs/2.0/commands.html#command

 'command cd' will execute fish's built-in 'cd', regardless of any function
 of the same name.

 Happy fishing,
--Torsten

 --
 | Prof. Dr. Torsten Grust
 | Database Systems — Universität Tübingen (Germany)
 | torsten.gr...@uni-tuebingen.de
 | db.inf.uni-tuebingen.de


 --
 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

--
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] Autoloading functions from .config/fish/functions seems to be broken, or I am missing something.

2013-02-18 Thread Robert Carpenter
Hello all,

Little bit by little bit I've been porting bash functions from my bash
workflow over to fish functions and have had great success, with one
caveat.  I haven't been able to get fish to autoload files from the
functions/ directory at all.  For now I'm just stashing everything in the
.config/fish/fish.config file and it all works fine.  Eventually though,
I'd like to have my functions broken out in a better organized scheme like
.config/fish/functions/git_commands.fish etc.

I spent some time searching through the mailing list and the github issue
tracker and wasn't able to find any solution that worked for me, as the
only similar problem was solved by updating to fish 1.21 and I am already
on fish 2.0.

As an example, I've copied out a few functions from the readymade prompts
from the web config into a .fish file which will not load at startup.

The command sequence below seems like I've explored all the options, but I
could very well be missing something.

Any suggestions are appreciated, for until then I am putting everything in
my fish.config.

Thanks
Robert



robert@Rapha ~ uname
Darwin

robert@Rapha ~ echo $fish_function_path
/Users/robert/.config/fish/functions /usr/local/etc/fish/functions
/usr/local/share/fish/functions

robert@Rapha ~ fish --version
fish, version 2.0.0

robert@Rapha ~ ls -la .config/fish/functions
total 32
drwxr-xr-x  4 robert  staff136 Feb 18 12:05 .
drwxr-xr-x  7 robert  staff238 Feb 18 12:32 ..
-rwxr-xr--  1 robert  staff224 Feb 18 12:05 git.fish

robert@Rapha ~ cat .config/fish/functions/git.fish
function git_is_dirty
  echo (git status -s --ignore-submodules=dirty) ^/dev/null
end

function git_branch_name
  echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end

robert@Rapha ~ git_branch_name
fish: Unknown command 'git_branch_name'

robert@Rapha ~ . ~/.config/fish/functions/git.fish

robert@Rapha ~ git_branch_name
master
--
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
is your hub for all things parallel software development, from weekly thought 
leadership blogs to news, videos, case studies, tutorials, tech docs, 
whitepapers, evaluation guides, and opinion stories. Check out the most 
recent posts - join the conversation now. http://goparallel.sourceforge.net/___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users