Re: [Fish-users] what's exactly the local scope?

2017-11-15 Thread Shiyao MA
On Thu, Nov 16, 2017 at 2:59 AM, Myrddin Emrys  wrote:
> That's not really Shiyao's question. The question really ends up being,
> 'What is the scope of a fish file outside of a function body?' Most
> programming languages have an implicit scope for the program itself.
>

For example, in Python:

// test.py

a = 3

def func():
print(a)

func()

// file ends

this will print 3.


the behavior of test.fish really confuses me on this regard.




-- 
Best,
Shiyao

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


[Fish-users] what's exactly the local scope?

2017-11-15 Thread Shiyao MA
Hi,

For the following script,

// test.fish
set -l KK 3

function main
echo $KK
end

main

// file ends...

echo $KK will give nothing.

My question is, for "set -l KK 3".   What does the -l (local) mean here?

-- 
Best,
Shiyao

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


[Fish-users] stty -echo has no affect.

2017-11-10 Thread Shiyao MA
Hi,

stty -echo has no affect.

Is it a bug or a current limitation?


Best,

-- 
Best,
Shiyao

--
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 to bind a key sequence to another key sequence?

2017-03-20 Thread Shiyao Ma
Hi,

On my terminal, ctrl+enter generates a seq of "^[[27;5;13~"
I'd like to bind it to a plain "enter".  So pressing ctrl+enter is the same as 
pressing a mere "enter".

I tried
bind \e"[27;5;13~" \r

but with no success.




On Mar 21, 2017, 12:43 +0800, Kurtis Rader <kra...@skepticism.us>, wrote:
> > On Mon, Mar 20, 2017 at 9:19 PM, Shiyao Ma <i...@introo.me> wrote:
> > > How to bind a key sequence to another key sequence?
> > >
> > > Reading the `man bind', I can only figure out how to bind a key sequence 
> > > to a function.
> > >
> > > But what about binding it to another key sequence?
> >
> > I do not understand the question. You can bind a key sequence to any 
> > sequence of commands, not just a function. It doesn't make sense to execute 
> > `bind abc ab` where the final `ab` in that command refers to the character 
> > sequence in `bind ab some_function`.
>
> --
> Kurtis Rader
> Caretaker of the exceptional canines Junior and Hank
--
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


[Fish-users] How to bind a key sequence to another key sequence?

2017-03-20 Thread Shiyao Ma
Hi,

How to bind a key sequence to another key sequence?

Reading the `man bind', I can only figure out how to bind a key sequence to
a function.

But what about binding it to another key sequence?


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


[Fish-users] fish_update_completions doesn't produce completions for readelf.

2017-02-24 Thread Shiyao Ma
Hi,

I run `fish_update_completions', but seems it doesn't generate the
completion from `man readelf'.

Anything I did wrong?


Regards.
--
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 to expand wildcard?

2016-11-30 Thread Shiyao Ma
dunno how bash works, but zsh has it.

It would be really handy to have this feature.
--
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


[Fish-users] How to expand wildcard?

2016-11-30 Thread Shiyao Ma
Hi,


Say I have three files, aa, ab, and bb
I want to delete aa and ab.

Normal, I would do: rm -f a*.  And hope  will exapnd a* to aa,ab.
so that I can confirm that's what I want to delete.

But fish won't expand.

-- 

吾輩は猫である。ホームーページはhttps://introo.me 。
--
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] Completion on a function

2016-11-25 Thread Shiyao Ma
Is it possible to see what a command is wrapped to?

Like, 'fish_wrapped_by e' gives env.
--
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] Completion on a function

2016-11-25 Thread Shiyao Ma
Thanks.

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


[Fish-users] How to specify the completion layout length?

2016-11-25 Thread Shiyao Ma
Hi,


In the following snapshot:
http://imgur.com/a/Bq6Mz

the completion list is layout in a Nx5 grid.

can I make it layout in Nx8 or Nx8, etc?

Regards.





-- 

吾輩は猫である。ホームーページはhttps://introo.me 。
--
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


[Fish-users] Completion on a function

2016-11-25 Thread Shiyao Ma
Hi,

I've this alias:
alias e 'env MY_PWD=$PWD emacsclient -t -a "" ^/dev/null'

when I type: e ,
fish will complete as if I've typed: env .

Indeed, I only want: e  to give a list of files in current dir.
How to achieve the above effect?


Thanks.

-- 

吾輩は猫である。ホームーページはhttps://introo.me 。
--
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users