Re: [Fish-users] a builtin AND a function?

2017-10-23 Thread Diego Zamboni
Mark,

cd is a builtin, but the default fish installation comes with a function
called cd (which overshadows the builtin) which wraps the builtin and adds
some functionality such as recognizing "-" to mean "previous directory",
keeping the directory history, etc. You can see its definition by typing
"functions cd".

--Diego


On Mon, Oct 23, 2017 at 5:10 PM, Mark Volkmann 
wrote:

> Entering "builtin -n" lists all the builtins. This list includes "cd".
> Entering "type -t cd" says that cd is a function.
> How can cd be both a builtin and a function?
>
> --
> 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] external command inside function fails on OSX

2016-11-30 Thread Diego Zamboni
I'm not sure how PATH settings are propagated through functions. One quick
solution would be to just use the full path for all commands (e.g.
/usr/sbin/diskutil).


On Wed, Nov 30, 2016 at 2:14 PM, Dave Cottlehuber  wrote:

> Hi fisherfolk,
>
> This is a copy-pasta function from my previous zsh setup, on OSX., to
> create a ramdisk of X Gb. Unfortunately the final command, diskutil
> erasevolume ... fails unless run manually. I've tried sleep 5,
> sprinkling quotes, wrapping it in (...) but nada. Any idea why?
>
> fish 2.3.1 via homebrew on OSX
>
> ```fish
> function ramdisk
> # calculate a size in GB for a new ramdisk
> set size (math "$argv[1] * 2097152")
> # ensure any existing ramdisk is unceremoniously dumped
> diskutil eject /Volumes/ramdisk >/dev/null 2>&1
> # create an unformatted ramdisk - works
> set ramdiskpath (hdiutil attach -nomount ram://$size)
> # format the disk using the path - fails
> diskutil erasevolume HFS+  ramdisk $ramdiskpath
> end
> ```
>
> $ ramdisk 12
>
> Unable to find disk for /dev/disk1
>
> -- sadpanda --
>
> $ diskutil list
>
> /dev/disk0 (internal, physical):
>#:   TYPE NAMESIZE
>IDENTIFIER
>0:  GUID_partition_scheme*3.0 TB
>disk0
>1:EFI EFI 209.7 MB
>disk0s1
>2:  Apple_HFS continuity  299.5 GB
>disk0s2
>3: Apple_Boot Recovery HD 650.0 MB
>disk0s3
>4: 516E7CBA-6ECF-11D6-8FF8-00022D09712B   2.7 TB
>disk0s4
>
> /dev/disk1 (disk image):
>#:   TYPE NAMESIZE
>IDENTIFIER
>0:   +12.9 GB
>disk1
>
> -- do it manually --
>
> $ diskutil erasevolume HFS+ ramdisk "/dev/disk1"
> Started erase on disk1
> Unmounting disk
> Erasing
> Initialized /dev/rdisk1 as a 12 GB case-insensitive HFS Plus volume
> Mounting disk
> Finished erase on disk1 ramdisk
>
> A+
> Dave
>
> 
> --
> ___
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users
>
--
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] Pining for !$ and !!

2016-05-19 Thread Diego Zamboni
Hi Stig,

I also missed !! and !$ when I moved to fish. Someone on this list (can’t 
remember who, sorry) pointed me to this:

 
https://github.com/fish-shell/fish-shell/wiki/Bash-Style-History-Substitution-%28%21%21-and-%21%24%29

I’ve been using it ever since and it works beautifully (I haven’t tried the 
abbr-based version at the bottom, only the key-binding one).

—Diego


> On 19 May 2016, at 10:21, Stig Brautaset  wrote:
> 
> Hello!
> 
> I'm a recent migrant from zsh and overall I'm overall happy with fish,
> but I do sorely miss the !$ and !! constructs. As an example, I often
> type a command only to have it error because I forgot to precede it with
> sudo. In zsh I would normally just type "sudo !!" to execute the
> previous command again, properly prefixed with sudo.
> 
> I understand that !$ and !! are not super discoverable, and that this is
> an explicit design goal in fish. Does fish have an alternative mechanism
> for this case that I just haven't discovered yet because I'm not
> thinking outside my zsh-shaped box? All suggestions welcome.
> 
> Stig
> 
> 
> --
> Mobile security can be enabling, not merely restricting. Employees who
> bring their own devices (BYOD) to work are irked by the imposition of MDM
> restrictions. Mobile Device Manager Plus allows you to control only the
> apps on BYO-devices by containerizing them, leaving personal data untouched!
> https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
> ___
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users


--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] fish as a first programming language

2016-01-24 Thread Diego Zamboni
You don't say how old your son is, but I'd go for the tutorials at code.org 
or
Scratch (scratch.mit.edu), which are far more structured, visual and geared 
for

kids. My 7- and 9-year olds love them.
--Diego

On Sun, Jan 24, 2016 at 2:03 PM, Patrick  
wrote:

Hi !

I thinking of introducing programming to my son. I am reading javascript
for kids but it seems to me that many of these concepts would be easier
in fish and a shell might be an even easier place to tinker than a
browser/text editor.

I am looking for the lowest barrier to entry.

What do you think?

-Patrick

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] Suspend?

2015-08-04 Thread Diego Zamboni
Hi Mike,

 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?

It works for me:

diego@cuper➜ sleep 50
press Ctrl-Z
'sleep 50' has stopped
diego@cuper➜ jobs
Job Group   State   Command
1   53568   stopped sleep 50
diego@cuper➜ bg
Send job 1 'sleep 50' to background
diego@cuper➜ fg
Send job 1, 'sleep 50' to foreground
^C~ 

  

Not sure where/how this is defined - I can’t find Ctrl-Z in the output from 
“bind”, but it must be defined somewhere.

—Diego

--
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] Suspend?

2015-08-04 Thread Diego Zamboni
Valid use cases, although for most of those I’d prefer something like tmux or 
screen.

—Diego


 On Aug 4, 2015, at 1:05 PM, Mike Meyer m...@mired.org wrote:
 
 On Tue, Aug 4, 2015 at 3:38 AM David Adam zanc...@ucc.gu.uwa.edu.au 
 mailto:zanc...@ucc.gu.uwa.edu.au wrote:
 On Tue, 4 Aug 2015, 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
 
  Seems to work like a charm.  Unless someone objects before I get back to a
  terminal, I'll submit a pull request for this.
 
 I'm not opposed to merging this, but I have to ask - why do you want to
 suspend your shell? Is there a use case that isn't covered by the state
 shared across shells such that exiting and restarting isn't sufficient?
 
 The use case isn't about shared data. In fact, I can't think of a use case 
 where for suspending a program that would be solved by that, so I'm curious 
 as to what your use cases are?
 
 I suspend programs to quickly switch between different environments, like 
 dropping out of vi to issue shell commands. In this case, the two 
 environments both happen to be command shells. In some cases, it's because 
 the shells need different values in the OS - userids, or some kind of virtual 
 environment, or possibly system call emulation layers. Sometimes, it's for 
 stuff in the shell, like needing cc or make to be something other than the 
 system versions. Come to think of it, fish sharing data may cause some of 
 those last ones to break. I'll have to try it and see now that I can switch 
 back and forth easily.

--
___
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-08 Thread Diego Zamboni
Thanks for this pointer! I’d been thinking of figuring out how to do it, and 
there it was.

The only problem I had was that I had to edit and save bind_bang and 
bind_dollar separately, it didn’t work when I tried to edit them together with 
fish_user_key_bindings. But once I figured that out, it worked like a charm.

—Diego

 On May 8, 2015, at 5:26 AM, Sanne Wouda sanne.wo...@gmail.com wrote:
 
 Take a look at https://github.com/fish-shell/fish-shell/wiki/Bash-Refugees 
 https://github.com/fish-shell/fish-shell/wiki/Bash-Refugees for a fish 
 implementation of !! and !$ .
 
 
 On Fri, 8 May 2015 08:08 Gour g...@atmarama.net mailto:g...@atmarama.net 
 wrote:
 
 Diego Zamboni di...@zzamboni.org mailto:di...@zzamboni.org writes:
 
  Aleksey: fish is indeed not bash, but in a good way. There are many things
  that could be improved, for sure, but it’s great even now.
 
 I was never really bash user, but was trying zsh and the the main seeling
 point for fish is that is *usable* out-of-the-box, while other shells require
 quite some tweaking to make it resemble something like fish.
 
 
 Sincerely,
 Gour
 
 --
 As a strong wind sweeps away a boat on the water,
 even one of the roaming senses on which the mind
 focuses can carry away a man's intelligence.
 
 
 --
 One dashboard for servers and applications across Physical-Virtual-Cloud
 Widest out-of-the-box monitoring support with 50+ applications
 Performance metrics, stats and reports that give you Actionable Insights
 Deep dive visibility with transaction tracing using APM Insight.
 http://ad.doubleclick.net/ddm/clk/290420510;117567292;y 
 http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
 ___
 Fish-users mailing list
 Fish-users@lists.sourceforge.net mailto:Fish-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/fish-users 
 https://lists.sourceforge.net/lists/listinfo/fish-users
 --
 One dashboard for servers and applications across Physical-Virtual-Cloud 
 Widest out-of-the-box monitoring support with 50+ applications
 Performance metrics, stats and reports that give you Actionable Insights
 Deep dive visibility with transaction tracing using APM Insight.
 http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
 Fish-users mailing list
 Fish-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/fish-users

--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
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-08 Thread Diego Zamboni

 On May 8, 2015, at 5:43 PM, Greg Reagle greg.rea...@umbc.edu wrote:
 
 I think it's worth noting here that in fish, if you just type 'c' on an
 empty command line, it will automatically show you the last command that
 started with 'c'.
 
 More precisely, it brings back the last command that *contains* a 'c'. Huge
 difference.
 
 Not for me.  For me, it does as Andrew Kreps noted--shows me the last command
 that *started* with whatever I typed.  I am using fish, version 2.1.1.

Same for me. To search any part of past commands, I have to type the text I’m 
looking for (which automatically suggests past lines that started with that, if 
any) and then type the up arrow, which starts cycling through past commands 
that contain that text anywhere.

—Diego



--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
___
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 Diego Zamboni
Robert,

I couldn’t agree more. There are a few things I found frustrating in fish at 
first (some I still do, like the inability to recall previous 
commands/arguments with !! and !$ - I have to look more into coding those with 
functions), but over time I’ve found the interactive shell experience SO MUCH 
BETTER. For example, when I have to use bash on other machines, I miss the 
automatic history completion and Ctl-F to complete commands. I *love* the 
completion system and how everything can be defined as a function so it’s 
trivial to redefine default behaviors if you want.

Aleksey: fish is indeed not bash, but in a good way. There are many things that 
could be improved, for sure, but it’s great even now. The community and 
developers are friendly and helpful, and if you stick around, you’ll see that 
good-natured feedback is always received well and addressed promptly.

—Diego

 
 On May 7, 2015, at 12:28 PM, Robert Carpenter rob...@robacarp.com wrote:
 
 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 

Re: [Fish-users] query about using alias with sudo

2015-03-05 Thread Diego Zamboni
Mandeep,

Have you also changed root’s shell to fish? Otherwise it will not read that 
config file.

If I may make a side comment, I wouldn’t recommend using fish as root’s shell. 
As much as I like fish, its code is not nearly as mature as bash or sh, so 
there’s a higher likelihood of bugs, which under root could have bad 
consequences. Also, I always prefer to make root’s environment as uncomfortable 
as possible, so that I’m not tempted to spend in it any time beyond the 
strictly necessary :)

—Diego


 On Mar 5, 2015, at 8:47 PM, Mandeep Sandhu mandeepsandhu@gmail.com 
 wrote:
 
 Hi All,
 
 Pardon my noob-ish question.
 
 I'm trying to add an alias which I can use running as myself or as
 root (via sudo).
 
 I've added the alias in /etc/fish/config.fish. It works from me (as
 user), but doesn't when run under sudo.
 
 How do I make the alias work under sudo?
 
 Thanks,
 -mandeep
 
 --
 Dive into the World of Parallel Programming The Go Parallel Website, sponsored
 by Intel and developed in partnership with Slashdot Media, is your hub for all
 things parallel software development, from weekly thought leadership blogs to
 news, videos, case studies, tutorials and more. Take a look and 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


--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and 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


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

2015-03-02 Thread Diego Zamboni
Ryan,

My mistake in my initial reply, you don’t use the $ in set. This works:

set -U -e fish_user_paths[3]

—Diego


 On Mar 2, 2015, at 11:17 AM, Ryan Burnett ryanjburn...@gmail.com wrote:
 
 Hi Diego,
 
 Thanks for your reply. When I:
 
 set -e $fish_user_paths[1]
 
 ...I get this error:
 
 set: Erase needs a variable name
 
 Next I tried:
 
 set -e $fish_user_paths[/usr/local/php5]
 
 ...and received the same error.
 
 Any idea how I can remove the /usr/local/php5 path from my $fish_user_paths?
 
 Thanks,
 
 Ryan
 
 
 
 On Sun, Mar 1, 2015 at 10:45 PM, Diego Zamboni di...@zzamboni.org 
 mailto:di...@zzamboni.org wrote:
 Hi Ryan,
 
 According to the documentation you can do:
 
 set -e $fish_user_paths[X]
 
 Where X is the element you want to delete (arrays start at 1 in fish).
 
 See http://fishshell.com/docs/current/commands.html#set: 
 http://fishshell.com/docs/current/commands.html#set:
 
 In erase mode, if variable indices are specified, only the specified slices 
 of the array variable will be erased.”
 
 —Diego
 
 
 On Mar 1, 2015, at 4:10 PM, Ryan Burnett ryanjburn...@gmail.com 
 mailto:ryanjburn...@gmail.com wrote:
 
 I accidentally added a path to $fish_user_paths:
 
 set -U fish_user_paths $fish_user_paths /usr/local/php5
 
 How can I remove this /usr/local/php5 path?
 --
 Dive into the World of Parallel Programming The Go Parallel Website, 
 sponsored
 by Intel and developed in partnership with Slashdot Media, is your hub for 
 all
 things parallel software development, from weekly thought leadership blogs to
 news, videos, case studies, tutorials and more. Take a look and join the
 conversation now. 
 http://goparallel.sourceforge.net/___
  
 http://goparallel.sourceforge.net/___
 Fish-users mailing list
 Fish-users@lists.sourceforge.net mailto:Fish-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/fish-users 
 https://lists.sourceforge.net/lists/listinfo/fish-users
 
 



signature.asc
Description: Message signed with OpenPGP using GPGMail
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and 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


Re: [Fish-users] Fish/vi issue

2015-01-04 Thread Diego Zamboni

Hi Birch,

I would imagine this has to do with the type of terminal you are using. 
I use TERM=xterm256 and it works fine.


--Diego

On 01/01/2015 04:42 p. m., J Birch wrote:
I have installed fish and am experiencing an annoying little warning I 
cannot get rid of, and it should be simple.


When I try to edit an file in vi, I get the following:

err: please use GUI or a 256-color terminal (so that t_Co=256 could be 
set)


Is there a certain env variable I should set?  I have tried a few to 
no avail.


Thank you!
Birch




--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and 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


--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and 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


Re: [Fish-users] Using fish without fishd

2014-11-17 Thread Diego Zamboni
Hi Booker,

I know all of this, but on my machine I simply don’t have fishd installed, nor 
running:

➜ ~ echo $FISH_VERSION 
2.1.1-1089-g0ea80a3
➜ ~ ps agux | grep fishd 
a10022  34066   0.0  0.0  2443012704 s001  S+   11:13AM   0:00.00 
grep fishd
➜ ~ which fishd
➜ ~ find /usr/local -name ‘fishd*’
➜ ~ brew list fish 
/usr/local/Cellar/fish/HEAD/bin/fish
/usr/local/Cellar/fish/HEAD/bin/fish_indent
/usr/local/Cellar/fish/HEAD/bin/mimedb
/usr/local/Cellar/fish/HEAD/etc/fish/config.fish
/usr/local/Cellar/fish/HEAD/share/doc/ (9 files)
/usr/local/Cellar/fish/HEAD/share/fish/ (690 files)
/usr/local/Cellar/fish/HEAD/share/man/ (3 files)
/usr/local/Cellar/fish/HEAD/share/pkgconfig/fish.pc

This is having installed from master. If I install fish 2.1.1, I do get fishd:

➜ ~ echo $FISH_VERSION 
2.1.1
➜ ~ ps agux | grep fishd 
a10022  36992   0.0  0.0  2456412548   ??  Ss8:58PM   0:00.00 
/usr/local/Cellar/fish/2.1.1/bin/fishd
➜ ~ which fishd
/usr/local/bin/fishd

Has fishd disappeared in post-2.1.1, or am I missing something?

—Diego


 On Nov 17, 2014, at 8:57 AM, Booker Bense bbe...@gmail.com wrote:
 
 The pkill fishd is there to kill off older versions of fishd so you'll be 
 running the latest and greatest.
 On of the first things fish does is see if fishd is running and if not it 
 starts it up. OS X uses a BSD
 based ps, so you need to use bsd ps options( 'augx)' to see everything on the 
 system. 
 
 ps agux | grep fishd 
 
 If you really don't want fishd running, then you probably don't want to be 
 using fish. If you use 
 add ons like oh-my-zsh or oh-my-bash, you can get bash and zsh to do most of 
 what fish does.
 
 - Booker C. Bense
 
  
 
 On Sun, Nov 16, 2014 at 8:01 PM, Diego Zamboni di...@zzamboni.org 
 mailto:di...@zzamboni.org wrote:
 Strange... I see all the references to fishd in documentation, but I don't 
 have fishd installed nor running. However, universal variables work fine.
 
 I'm installing fish using Homebrew, and the formula file contains a pkill 
 fishd in the postinstall section, so I guess it must've been there not too 
 long ago. I'm puzzled.
 
 --Diego
 
 
  On Nov 16, 2014, at 2:48 PM, Mario Castelán Castro marioxcc...@yandex.com 
  mailto:marioxcc...@yandex.com wrote:
 
  Hello.
 
  Is it possible to use fish without fishd even if it loses some
  functionality?. Specifically, is it possible to configure fish so as
  to not to start fishd and not to print an error message about lacking
  fishd?.
 
  Regards and thanks.
 
  --
  Comprehensive Server Monitoring with Site24x7.
  Monitor 10 servers for $9/Month.
  Get alerted through email, SMS, voice calls or mobile push notifications.
  Take corrective actions from your mobile device.
  http://pubads.g.doubleclick.net/gampad/clk?id=154624111iu=/4140/ostg.clktrk
   
  http://pubads.g.doubleclick.net/gampad/clk?id=154624111iu=/4140/ostg.clktrk
  ___
  Fish-users mailing list
  Fish-users@lists.sourceforge.net mailto:Fish-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/fish-users 
  https://lists.sourceforge.net/lists/listinfo/fish-users
 
 
 --
 Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
 from Actuate! Instantly Supercharge Your Business Reports and Dashboards
 with Interactivity, Sharing, Native Excel Exports, App Integration  more
 Get technology previously reserved for billion-dollar corporations, FREE
 http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk 
 http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
 ___
 Fish-users mailing list
 Fish-users@lists.sourceforge.net mailto:Fish-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/fish-users 
 https://lists.sourceforge.net/lists/listinfo/fish-users
 
 --
 Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
 from Actuate! Instantly Supercharge Your Business Reports and Dashboards
 with Interactivity, Sharing, Native Excel Exports, App Integration  more
 Get technology previously reserved for billion-dollar corporations, FREE
 http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk___
 Fish-users mailing list
 Fish-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/fish-users

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar

Re: [Fish-users] Using fish without fishd

2014-11-17 Thread Diego Zamboni
I see. Thanks for the clarification!

—Diego

 On Nov 17, 2014, at 11:20 PM, ridiculous_fish corydo...@ridiculousfish.com 
 wrote:
 
 On trunk, universal variables no longer require fishd (!) and so it doesn't 
 get launched. This was first enabled with commit 20d7a142, and will be the 
 default behavior in the next release.
 
 _fish
 
 On Nov 17, 2014, at 9:00 PM, Diego Zamboni di...@zzamboni.org 
 mailto:di...@zzamboni.org wrote:
 
 Hi Booker,
 
 I know all of this, but on my machine I simply don’t have fishd installed, 
 nor running:
 
 ➜ ~ echo $FISH_VERSION 
 2.1.1-1089-g0ea80a3
 ➜ ~ ps agux | grep fishd 
 a10022  34066   0.0  0.0  2443012704 s001  S+   11:13AM   
 0:00.00 grep fishd
 ➜ ~ which fishd
 ➜ ~ find /usr/local -name ‘fishd*’
 ➜ ~ brew list fish 
 /usr/local/Cellar/fish/HEAD/bin/fish
 /usr/local/Cellar/fish/HEAD/bin/fish_indent
 /usr/local/Cellar/fish/HEAD/bin/mimedb
 /usr/local/Cellar/fish/HEAD/etc/fish/config.fish
 /usr/local/Cellar/fish/HEAD/share/doc/ (9 files)
 /usr/local/Cellar/fish/HEAD/share/fish/ (690 files)
 /usr/local/Cellar/fish/HEAD/share/man/ (3 files)
 /usr/local/Cellar/fish/HEAD/share/pkgconfig/fish.pc
 
 This is having installed from master. If I install fish 2.1.1, I do get 
 fishd:
 
 ➜ ~ echo $FISH_VERSION 
 2.1.1
 ➜ ~ ps agux | grep fishd 
 a10022  36992   0.0  0.0  2456412548   ??  Ss8:58PM   
 0:00.00 /usr/local/Cellar/fish/2.1.1/bin/fishd
 ➜ ~ which fishd
 /usr/local/bin/fishd
 
 Has fishd disappeared in post-2.1.1, or am I missing something?
 
 —Diego
 
 
 On Nov 17, 2014, at 8:57 AM, Booker Bense bbe...@gmail.com 
 mailto:bbe...@gmail.com wrote:
 
 The pkill fishd is there to kill off older versions of fishd so you'll be 
 running the latest and greatest.
 On of the first things fish does is see if fishd is running and if not it 
 starts it up. OS X uses a BSD
 based ps, so you need to use bsd ps options( 'augx)' to see everything on 
 the system. 
 
 ps agux | grep fishd 
 
 If you really don't want fishd running, then you probably don't want to be 
 using fish. If you use 
 add ons like oh-my-zsh or oh-my-bash, you can get bash and zsh to do most 
 of what fish does.
 
 - Booker C. Bense
 
  
 
 On Sun, Nov 16, 2014 at 8:01 PM, Diego Zamboni di...@zzamboni.org 
 mailto:di...@zzamboni.org wrote:
 Strange... I see all the references to fishd in documentation, but I don't 
 have fishd installed nor running. However, universal variables work fine.
 
 I'm installing fish using Homebrew, and the formula file contains a pkill 
 fishd in the postinstall section, so I guess it must've been there not too 
 long ago. I'm puzzled.
 
 --Diego
 
 
  On Nov 16, 2014, at 2:48 PM, Mario Castelán Castro 
  marioxcc...@yandex.com mailto:marioxcc...@yandex.com wrote:
 
  Hello.
 
  Is it possible to use fish without fishd even if it loses some
  functionality?. Specifically, is it possible to configure fish so as
  to not to start fishd and not to print an error message about lacking
  fishd?.
 
  Regards and thanks.
 

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] Using fish without fishd

2014-11-16 Thread Diego Zamboni
Strange... I see all the references to fishd in documentation, but I don't have 
fishd installed nor running. However, universal variables work fine.

I'm installing fish using Homebrew, and the formula file contains a pkill 
fishd in the postinstall section, so I guess it must've been there not too 
long ago. I'm puzzled.

--Diego


 On Nov 16, 2014, at 2:48 PM, Mario Castelán Castro marioxcc...@yandex.com 
 wrote:
 
 Hello.
 
 Is it possible to use fish without fishd even if it loses some 
 functionality?. Specifically, is it possible to configure fish so as 
 to not to start fishd and not to print an error message about lacking 
 fishd?.
 
 Regards and thanks.
 
 --
 Comprehensive Server Monitoring with Site24x7.
 Monitor 10 servers for $9/Month.
 Get alerted through email, SMS, voice calls or mobile push notifications.
 Take corrective actions from your mobile device.
 http://pubads.g.doubleclick.net/gampad/clk?id=154624111iu=/4140/ostg.clktrk
 ___
 Fish-users mailing list
 Fish-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/fish-users


--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] how to echo minus symbol

2014-11-12 Thread Diego Zamboni
Hi Santhosh,

It works fine for me:

➜ ~ echo $FISH_VERSION 
2.1.1-1075-g701a37f
➜ ~ echo -
-

—Diego


 On Nov 12, 2014, at 5:39 PM, Santhosh T santhosh.tek...@gmail.com wrote:
 
 the command:
 
 echo -
 
 prints nothing
 
 i tried following also:
 
 echo -
 echo '-'
 
 but following works:
 
 echo -e \x2D
 
 what is so special about symbol -
 
 the documentation also doesn't say anything special case for minus symbol
 
 thanks
 santhosh
 --
 Comprehensive Server Monitoring with Site24x7.
 Monitor 10 servers for $9/Month.
 Get alerted through email, SMS, voice calls or mobile push notifications.
 Take corrective actions from your mobile device.
 http://pubads.g.doubleclick.net/gampad/clk?id=154624111iu=/4140/ostg.clktrk___
 Fish-users mailing list
 Fish-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/fish-users

--
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111iu=/4140/ostg.clktrk___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] invalid options are not highlighted in red

2014-11-10 Thread Diego Zamboni
I think the complete inside the function should be builtin complete to 
ensure the native function is called.

--Diego

 On Nov 10, 2014, at 1:59 AM, David Adam zanc...@ucc.gu.uwa.edu.au wrote:
 
 Presumably you could do something like this:
 
 ```
 function complete
complete --authoritative $argv
 end
 funcsave complete
 ```
 
 I have not tested this. Make backups and ensure you have an alternative 
 shell installed and enabled if you are going to try it, because you might 
 need to delete ~/.config/fish/functions/complete.fish.
 
 [DAA]
 
 On Wed, 5 Nov 2014, Santhosh T wrote:
 
 HI David,
 
 so the feature is there. is there any way to make authoritative by default
 explicitly
 
 - santhosh
 
 On Wed, Nov 5, 2014 at 9:24 AM, David Adam zanc...@ucc.gu.uwa.edu.au
 wrote:
 
 This functionality was altered before the release of fish 2.0.0.
 
 Commit 6eb66770a49944 [1] makes completions non-authoritative by default.
 If you pass the `--authoritative` argument to your completions, the
 behaviour you describe will return. However, this is not enabled for
 completions shipped with fish because of the difficulty in maintaining
 parity between these completions and the upstream program.
 
 With the next release of fish, a supported path for completions shipped by
 upstream vendors will be available; these can make use of the
 `--authoritative` option for even better syntax highlighting.
 
 Hope that helps!
 
 David Adam
 zanc...@ucc.gu.uwa.edu.au
 
 
 [1]: https://github.com/fish-shell/fish-shell/commit/6eb66770a49944
 
 On Mon, 3 Nov 2014, Santhosh T wrote:
 the article http://lwn.net/Articles/136232/ says that
 fish shell can show misspelled options as errors.
 
 it has a screenshot also where --colour is highlighted in red in ls
 --colour command.
 
 
 
 when I tried the same, it didn't work.
 
 so i asked the question
 
 - santhosh
 
 
 
 On Mon, Nov 3, 2014 at 2:39 PM, Cedric Auger sedri...@gmail.com wrote:
 
 
 
 2014-10-31 17:58 GMT+01:00 Santhosh T santhosh.tek...@gmail.com:
 
 when i type ls --unknownoption
 
 i am expected --unknownoption to be shown in red.
 
 fish only showing wrong commands in red color, but not wrong options
 
 i already did run fish_update_completions
 
 I am using MAC
 
 thanks
 Santhosh
 
 
 
 I first glance, I would say, that it is not a realistic feature.
 How could you tell if a given option is a right or a wrong one?
 
 For the command, work is easy: just ask the file system is there is
 such
 an executable program.
 But there is no Unix command which tells given a program and options if
 they are compatible.
 Of course, like autocompletion, you could forbid some options (but that
 would concern only very specific programs for which the set of good
 options can be easily known).
 Plus there should be some clever parsing, as for example ls --
 --unknownoption is a valid command (at least on the Ubuntu version I
 have).
 That is because I can create a file named --unknownoption.
 
 
 --
 .../Sedrikov\...
 
 
 
 Cheers,
 
 David Adam
 zanc...@ucc.gu.uwa.edu.au
 Ask Me About Our SLA!
 
 
 
 Cheers,
 
 David Adam
 zanc...@ucc.gu.uwa.edu.au
 Ask Me About Our SLA!
 
 --
 ___
 Fish-users mailing list
 Fish-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/fish-users


--
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] ALT+Left and ALT+Right is not moving forward/backward in directory history

2014-11-01 Thread Diego Zamboni
I found a solution - I am using Terminal.app, and in the “Keyboards” tab of the 
preferences I found the mappings for different key combinations, among them the 
mappings for Alt-Left and Alt-right (see attached screenshot). Those are the 
sequences that need to be used with the “bind” command to map to the 
appropriate functions:

bind \033f next-or-forward-word
bind \033b prevd-or-backward-word

And now Alt-left and Alt-right work as expected!

I don’t know if you are using Terminal.app or other terminal program, but I’m 
betting the solution must be a similar one.

Hope this helps,
—Diego





 On Oct 31, 2014, at 11:16 AM, Diego Zamboni di...@zzamboni.org wrote:
 
 Hi,
 
 I’m having the same issue - Alt-left and Alt-right do nothing.
 
 “dirs” for me (on OSX as well) also shows just the current directory, but 
 “dirh” shows the full directory history. Also, prevd-or-backward-word and 
 next-or-forward-word work fine when invoked directly:
 
 a10022@cuper ~/Documents dirh
 /Users/a10022/Downloads  /  /Users/a10022/Documents  
 a10022@cuper ~/Documents prevd-or-backward-word 
 a10022@cuper / prevd-or-backward-word 
 a10022@cuper ~/Downloads nextd-or-forward-word 
 a10022@cuper / 
 
 So the functionality seems to be there, I think what’s failing are the key 
 bindings:
 
 a10022@cuper / bind | grep prevd-or
 bind \e\eOD prevd-or-backward-word
 bind \e\e\[D prevd-or-backward-word
 bind \eO3D prevd-or-backward-word
 bind \e\[3D prevd-or-backward-word
 bind \e\[1\;3D prevd-or-backward-word
 
 But I’m not sure what the magic sequence for Alt-left and Alt-right needs to 
 be. For example, these two commands make it so that I can use Alt-[ and Alt-] 
 to navigate the directory history:
 
 bind \e\[ prevd-or-backward-word
 bind \e\] nextd-or-forward-word
 
 I think it would be nice for fish to have a “capture key” mode that shows you 
 the sequence to use for any keys you press.
 
 —Diego
 
 On Oct 31, 2014, at 9:53 AM, Santhosh T santhosh.tek...@gmail.com 
 mailto:santhosh.tek...@gmail.com wrote:
 
 I am using mac
 
 when i tried ALT+Left and ALT+Right, without any command, I dont see
 current directory changing.
 
 when i run dirs command, I noticed that it contains only current directory.
 
 
 how to I do setopt autopush as in zsh
 
 thanks
 santhosh
 --
 ___
 Fish-users mailing list
 Fish-users@lists.sourceforge.net mailto:Fish-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/fish-users
 

--
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] ALT+Left and ALT+Right is not moving forward/backward in directory history

2014-11-01 Thread Diego Zamboni
I found a solution - I am using Terminal.app, and in the “Keyboards” tab of the 
preferences I found the mappings for different key combinations, among them the 
mappings for Alt-Left and Alt-right (see attached screenshot). Those are the 
sequences that need to be used with the “bind” command to map to the 
appropriate functions:

bind \033f next-or-forward-word
bind \033b prevd-or-backward-word

And now Alt-left and Alt-right work as expected!

I don’t know if you are using Terminal.app or other terminal program, but I’m 
betting the solution must be a similar one.

Hope this helps,
—Diego



 On Oct 31, 2014, at 11:32 AM, Santhosh T santhosh.tek...@gmail.com wrote:
 
 Hi Deigo,
 
 dirh works for me as you said;
 also ALT+Left and ALT+Right move cursor one work left or right as expected
 
 I tried the binding you suggested
 bind \e\[ prevd-or-backward-word
 bind \e\] nextd-or-forward-word
 
 But when i hit ALT-[ and Alt-], i see following characters in termainl:
   ‘‘‘
 thanks
 Santhosh
 
 
 On Fri, Oct 31, 2014 at 11:46 PM, Diego Zamboni di...@zzamboni.org 
 mailto:di...@zzamboni.org wrote:
 Hi,
 
 I’m having the same issue - Alt-left and Alt-right do nothing.
 
 “dirs” for me (on OSX as well) also shows just the current directory, but 
 “dirh” shows the full directory history. Also, prevd-or-backward-word and 
 next-or-forward-word work fine when invoked directly:
 
 a10022@cuper ~/Documents dirh
 /Users/a10022/Downloads  /  /Users/a10022/Documents  
 a10022@cuper ~/Documents prevd-or-backward-word 
 a10022@cuper / prevd-or-backward-word 
 a10022@cuper ~/Downloads nextd-or-forward-word 
 a10022@cuper / 
 
 So the functionality seems to be there, I think what’s failing are the key 
 bindings:
 
 a10022@cuper / bind | grep prevd-or
 bind \e\eOD prevd-or-backward-word
 bind \e\e\[D prevd-or-backward-word
 bind \eO3D prevd-or-backward-word
 bind \e\[3D prevd-or-backward-word
 bind \e\[1\;3D prevd-or-backward-word
 
 But I’m not sure what the magic sequence for Alt-left and Alt-right needs to 
 be. For example, these two commands make it so that I can use Alt-[ and Alt-] 
 to navigate the directory history:
 
 bind \e\[ prevd-or-backward-word
 bind \e\] nextd-or-forward-word
 
 I think it would be nice for fish to have a “capture key” mode that shows you 
 the sequence to use for any keys you press.
 
 —Diego
 
 On Oct 31, 2014, at 9:53 AM, Santhosh T santhosh.tek...@gmail.com 
 mailto:santhosh.tek...@gmail.com wrote:
 
 I am using mac
 
 when i tried ALT+Left and ALT+Right, without any command, I dont see
 current directory changing.
 
 when i run dirs command, I noticed that it contains only current directory.
 
 
 how to I do setopt autopush as in zsh
 
 thanks
 santhosh
 --
 ___
 Fish-users mailing list
 Fish-users@lists.sourceforge.net mailto:Fish-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/fish-users 
 https://lists.sourceforge.net/lists/listinfo/fish-users
 
 

--
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] ALT+Left and ALT+Right is not moving forward/backward in directory history

2014-10-31 Thread Diego Zamboni
Hi,

I’m having the same issue - Alt-left and Alt-right do nothing.

“dirs” for me (on OSX as well) also shows just the current directory, but 
“dirh” shows the full directory history. Also, prevd-or-backward-word and 
next-or-forward-word work fine when invoked directly:

a10022@cuper ~/Documents dirh
/Users/a10022/Downloads  /  /Users/a10022/Documents  
a10022@cuper ~/Documents prevd-or-backward-word 
a10022@cuper / prevd-or-backward-word 
a10022@cuper ~/Downloads nextd-or-forward-word 
a10022@cuper / 

So the functionality seems to be there, I think what’s failing are the key 
bindings:

a10022@cuper / bind | grep prevd-or
bind \e\eOD prevd-or-backward-word
bind \e\e\[D prevd-or-backward-word
bind \eO3D prevd-or-backward-word
bind \e\[3D prevd-or-backward-word
bind \e\[1\;3D prevd-or-backward-word

But I’m not sure what the magic sequence for Alt-left and Alt-right needs to 
be. For example, these two commands make it so that I can use Alt-[ and Alt-] 
to navigate the directory history:

bind \e\[ prevd-or-backward-word
bind \e\] nextd-or-forward-word

I think it would be nice for fish to have a “capture key” mode that shows you 
the sequence to use for any keys you press.

—Diego

On Oct 31, 2014, at 9:53 AM, Santhosh T santhosh.tek...@gmail.com wrote:
 
 I am using mac
 
 when i tried ALT+Left and ALT+Right, without any command, I dont see
 current directory changing.
 
 when i run dirs command, I noticed that it contains only current directory.
 
 
 how to I do setopt autopush as in zsh
 
 thanks
 santhosh
 --
 ___
 Fish-users mailing list
 Fish-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/fish-users

--
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] ALT+Left and ALT+Right is not moving forward/backward in directory history

2014-10-31 Thread Diego Zamboni
Yes, this works. Thanks!
—Diego

 On Oct 31, 2014, at 12:05 PM, Santhosh T santhosh.tek...@gmail.com wrote:
 
 I found the solution.
 
 do not put bind commands in config.fish.
 
 put them in file: ~/.config/fish/functions/fish_user_key_bindings.fish
 
 
 function fish_user_key_bindings
   # put your bind commands here
 end
 
 On Sat, Nov 1, 2014 at 12:22 AM, Santhosh T santhosh.tek...@gmail.com 
 mailto:santhosh.tek...@gmail.com wrote:
 Hi,
 
 I tried to push those two bind commands in ~/.config/fish/config.fish;
 but this didn't work.
 
 but if i do:
source ~/.config/fish/config.fish
 
 then it started working.
 any clues, what is wrong here..
 
 - santhosh
 
 
 
 On Sat, Nov 1, 2014 at 12:06 AM, Diego Zamboni di...@zzamboni.org 
 mailto:di...@zzamboni.org wrote:
 I found a solution - I am using Terminal.app, and in the “Keyboards” tab of 
 the preferences I found the mappings for different key combinations, among 
 them the mappings for Alt-Left and Alt-right (see attached screenshot). Those 
 are the sequences that need to be used with the “bind” command to map to the 
 appropriate functions:
 
 bind \033f next-or-forward-word
 bind \033b prevd-or-backward-word
 
 And now Alt-left and Alt-right work as expected!
 
 I don’t know if you are using Terminal.app or other terminal program, but I’m 
 betting the solution must be a similar one.
 
 Hope this helps,
 —Diego
 
 
 Profiles.gif
 
 
 On Oct 31, 2014, at 11:16 AM, Diego Zamboni di...@zzamboni.org 
 mailto:di...@zzamboni.org wrote:
 
 Hi,
 
 I’m having the same issue - Alt-left and Alt-right do nothing.
 
 “dirs” for me (on OSX as well) also shows just the current directory, but 
 “dirh” shows the full directory history. Also, prevd-or-backward-word and 
 next-or-forward-word work fine when invoked directly:
 
 a10022@cuper ~/Documents dirh
 /Users/a10022/Downloads  /  /Users/a10022/Documents  
 a10022@cuper ~/Documents prevd-or-backward-word 
 a10022@cuper / prevd-or-backward-word 
 a10022@cuper ~/Downloads nextd-or-forward-word 
 a10022@cuper / 
 
 So the functionality seems to be there, I think what’s failing are the key 
 bindings:
 
 a10022@cuper / bind | grep prevd-or
 bind \e\eOD prevd-or-backward-word
 bind \e\e\[D prevd-or-backward-word
 bind \eO3D prevd-or-backward-word
 bind \e\[3D prevd-or-backward-word
 bind \e\[1\;3D prevd-or-backward-word
 
 But I’m not sure what the magic sequence for Alt-left and Alt-right needs to 
 be. For example, these two commands make it so that I can use Alt-[ and 
 Alt-] to navigate the directory history:
 
 bind \e\[ prevd-or-backward-word
 bind \e\] nextd-or-forward-word
 
 I think it would be nice for fish to have a “capture key” mode that shows 
 you the sequence to use for any keys you press.
 
 —Diego
 
 On Oct 31, 2014, at 9:53 AM, Santhosh T santhosh.tek...@gmail.com 
 mailto:santhosh.tek...@gmail.com wrote:
 
 I am using mac
 
 when i tried ALT+Left and ALT+Right, without any command, I dont see
 current directory changing.
 
 when i run dirs command, I noticed that it contains only current directory.
 
 
 how to I do setopt autopush as in zsh
 
 thanks
 santhosh
 --
 ___
 Fish-users mailing list
 Fish-users@lists.sourceforge.net mailto:Fish-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/fish-users 
 https://lists.sourceforge.net/lists/listinfo/fish-users
 
 
 
 

--
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users