Re: [Fish-users] Add .bash_profile commands to fish

2014-06-18 Thread Matteo Cavalleri
function mcd mkdir -p $argv[1] and cd $argv[1] end > I discovered a nice collection of .bash_profile commands and would like to > add this one to fish: > > mcd () { mkdir -p "$1" && cd "$1"; } > > I've tried adding this to config.fish with no luck: > > function mcd > mkdir -p "$1"

[Fish-users] Add .bash_profile commands to fish

2014-06-18 Thread Ryan Burnett
I discovered a nice collection of .bash_profile commands and would like to add this one to fish: mcd () { mkdir -p "$1" && cd "$1"; } I've tried adding this to config.fish with no luck: function mcd mkdir -p "$1" && cd "$1"; end Any idea how to

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

2014-06-18 Thread Jacobo de Vera
Hi Ryan, You may want that setting only when running an interactive shell. Otherwise it will also run when you try to run a command directly on a non-interactive ssh connection from another box, to name a case. if status --is-interactive cd ~/Sites end Regards, Jacobo de Vera http://www.jacob

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

2014-06-18 Thread Ryan Burnett
Hi Jacobo, That works even better - thank you! Ryan On Wed, Jun 18, 2014 at 10:58 AM, Jacobo de Vera wrote: > if status --is-interactive >cd ~/Sites > end > -- HPCC Systems Open Source Big Data Platform from Lexis

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 al

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

2014-06-18 Thread Ryan Burnett
Hi Robert, I added 'cd ~/Sites' to config.fish and Terminal is perfectly starting in ~/Sites. Please let me know if this is incorrect. Otherwise, thanks for your help! Ryan On Wed, Jun 18, 2014 at 10:05 AM, Robert Carpenter wrote: > In the past, my approach to this has been to just define an

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

2014-06-18 Thread Ryan Burnett
@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