zsh-users
 help / color / mirror / code / Atom feed
* Re: Twitter Daily ZSH Tip
@ 2013-10-28 17:34 Eric De Mund
  2013-10-28 17:55 ` Peter Stephenson
  0 siblings, 1 reply; 9+ messages in thread
From: Eric De Mund @ 2013-10-28 17:34 UTC (permalink / raw)
  To: zsh-users

zzapper,

On 19 October 2013 15:39, zzapper <david@rayninfo.co.uk> wrote:
> Noticing that a previous ZSH Daily Tip Twitter feed had ceased in 2010
> I have started a new one
>
> https://twitter.com/dailyzshtip
>
> I hope it will help popularize our favorite shell.
>
> It will feature day-to-day practical stuff such as
>
> vi *(.om[$1])   # vim newest file
>
> Any tips, advice or retweeting welcome!

Problem here:

    % vi *(.om[$1])         
    zsh: bad math expression: operand expected at `'
    % 

Please advise. My environment is:

    % echo $ZSH_VERSION     
    4.3.17                  # this host is debian 7.2 (debian stable)
    % setopt | sort | column
    allexport               interactive             nobgnice
    autocd                  interactivecomments     nohup
    correctall              longlistjobs            nonomatch
    extendedglob            markdirs                pathdirs
    globdots                menucomplete            pushdsilent
    histignoredups          noautolist              shinstdin
    ignoreeof               nobeep
    % 

Regards,
Eric
--
Eric De Mund
ead@ixian.com


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Twitter Daily ZSH Tip
  2013-10-28 17:34 Twitter Daily ZSH Tip Eric De Mund
@ 2013-10-28 17:55 ` Peter Stephenson
  0 siblings, 0 replies; 9+ messages in thread
From: Peter Stephenson @ 2013-10-28 17:55 UTC (permalink / raw)
  To: zsh-users

On Mon, 28 Oct 2013 10:34:59 -0700
Eric De Mund <ead@ixian.com> wrote:
> > vi *(.om[$1])   # vim newest file
> 
> Problem here:
> 
>     % vi *(.om[$1])         
>     zsh: bad math expression: operand expected at `'

I think you want

  vi *(.om[1])

or if you wanted to be really different

  vi *(.Om[-1])

Otherwise you're substituting a positional parameter, which you don't
want.  The error you got comes from it being empty, so there's no
number, which is what it's complaining about, slightly cryptically.

pws


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Twitter Daily ZSH Tip
  2013-10-20 17:36 ` Valodim Skywalker
@ 2013-10-20 18:06   ` zzapper
  0 siblings, 0 replies; 9+ messages in thread
From: zzapper @ 2013-10-20 18:06 UTC (permalink / raw)
  To: zsh-users

Valodim Skywalker <valodim@mugenguild.com> wrote in 
news:20131020173646.GA11398@mugenguild.com:

> zzapper(david@rayninfo.co.uk)@Sat, Oct 19, 2013 at 10:09:35AM +0000:
>> vi *(.om[$1])   # vim newest file
> 
> The [$1] should probably be [1] ;)
Valodim,
Whoops yes I carelessly borrowed that from my .zshrc where I have a 
function which allows me specify more options

function vew()
{
# name : vew
# description : vi newest file
# or nth newest file if a numeric parameter
# or newest file with $1 string in name
if [ $# -gt 0 ]
then
   if [[ "$1" == [0-9] ]]
   then
   gvim.exe *(.om[$1]) &
   else
   gvim.exe *$1*(.om[1]) &
fi
else
gvim.exe *~vssver.scc(.om[1]) &
fi
}

zzapper


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Twitter Daily ZSH Tip
  2013-10-19 10:09 zzapper
                   ` (2 preceding siblings ...)
  2013-10-19 19:11 ` Mark van Dijk
@ 2013-10-20 17:36 ` Valodim Skywalker
  2013-10-20 18:06   ` zzapper
  3 siblings, 1 reply; 9+ messages in thread
From: Valodim Skywalker @ 2013-10-20 17:36 UTC (permalink / raw)
  To: zzapper; +Cc: zsh-users

[-- Attachment #1: Type: text/plain, Size: 149 bytes --]

zzapper(david@rayninfo.co.uk)@Sat, Oct 19, 2013 at 10:09:35AM +0000:
> vi *(.om[$1])   # vim newest file

The [$1] should probably be [1] ;)


 - V


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Twitter Daily ZSH Tip
  2013-10-19 10:09 zzapper
  2013-10-19 14:53 ` Jérémie Roquet
  2013-10-19 16:42 ` René Wilhelm
@ 2013-10-19 19:11 ` Mark van Dijk
  2013-10-20 17:36 ` Valodim Skywalker
  3 siblings, 0 replies; 9+ messages in thread
From: Mark van Dijk @ 2013-10-19 19:11 UTC (permalink / raw)
  To: zsh-users

On 10/19/2013 12:09 PM, zzapper wrote:
> Hi
> 
> Noticing that a previous ZSH Daily Tip Twitter feed had ceased in 2010 I 
> have started a new one
> 
> https://twitter.com/dailyzshtip
> 
> I hope it will help popularize our favorite shell.
> 
> It will feature day-to-day practical stuff such as
> 
> vi *(.om[$1])   # vim newest file
> 
> Any tips, advice or retweeting welcome!

Looks good. I'm following!

Mark


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Twitter Daily ZSH Tip
  2013-10-19 16:42 ` René Wilhelm
@ 2013-10-19 18:00   ` Nick Cross
  0 siblings, 0 replies; 9+ messages in thread
From: Nick Cross @ 2013-10-19 18:00 UTC (permalink / raw)
  To: zzapper; +Cc: zsh-users


Looks good! Could you do an RSS version?

Thanks

On 19/10/13 17:42, René Wilhelm wrote:
> Thanks! :)
>
>
> On 19 October 2013 15:39, zzapper <david@rayninfo.co.uk> wrote:
>
>> Hi
>>
>> Noticing that a previous ZSH Daily Tip Twitter feed had ceased in 2010 I
>> have started a new one
>>
>> https://twitter.com/dailyzshtip
>>
>> I hope it will help popularize our favorite shell.
>>
>> It will feature day-to-day practical stuff such as
>>
>> vi *(.om[$1])   # vim newest file
>>
>> Any tips, advice or retweeting welcome!
>>
>> zzapper
>>
>>
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Twitter Daily ZSH Tip
  2013-10-19 10:09 zzapper
  2013-10-19 14:53 ` Jérémie Roquet
@ 2013-10-19 16:42 ` René Wilhelm
  2013-10-19 18:00   ` Nick Cross
  2013-10-19 19:11 ` Mark van Dijk
  2013-10-20 17:36 ` Valodim Skywalker
  3 siblings, 1 reply; 9+ messages in thread
From: René Wilhelm @ 2013-10-19 16:42 UTC (permalink / raw)
  To: zzapper; +Cc: zsh-users

[-- Attachment #1: Type: text/plain, Size: 429 bytes --]

Thanks! :)


On 19 October 2013 15:39, zzapper <david@rayninfo.co.uk> wrote:

> Hi
>
> Noticing that a previous ZSH Daily Tip Twitter feed had ceased in 2010 I
> have started a new one
>
> https://twitter.com/dailyzshtip
>
> I hope it will help popularize our favorite shell.
>
> It will feature day-to-day practical stuff such as
>
> vi *(.om[$1])   # vim newest file
>
> Any tips, advice or retweeting welcome!
>
> zzapper
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Twitter Daily ZSH Tip
  2013-10-19 10:09 zzapper
@ 2013-10-19 14:53 ` Jérémie Roquet
  2013-10-19 16:42 ` René Wilhelm
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Jérémie Roquet @ 2013-10-19 14:53 UTC (permalink / raw)
  To: zzapper; +Cc: Zsh Users

Hi,

2013/10/19 zzapper <david@rayninfo.co.uk>:
> Noticing that a previous ZSH Daily Tip Twitter feed had ceased in 2010 I
> have started a new one
>
> https://twitter.com/dailyzshtip
>
> I hope it will help popularize our favorite shell.
>
> It will feature day-to-day practical stuff such as
>
> vi *(.om[$1])   # vim newest file

Great idea, thank you!

-- 
Jérémie


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Twitter Daily ZSH Tip
@ 2013-10-19 10:09 zzapper
  2013-10-19 14:53 ` Jérémie Roquet
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: zzapper @ 2013-10-19 10:09 UTC (permalink / raw)
  To: zsh-users

Hi

Noticing that a previous ZSH Daily Tip Twitter feed had ceased in 2010 I 
have started a new one

https://twitter.com/dailyzshtip

I hope it will help popularize our favorite shell.

It will feature day-to-day practical stuff such as

vi *(.om[$1])   # vim newest file

Any tips, advice or retweeting welcome!

zzapper


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-10-28 17:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-28 17:34 Twitter Daily ZSH Tip Eric De Mund
2013-10-28 17:55 ` Peter Stephenson
  -- strict thread matches above, loose matches on Subject: below --
2013-10-19 10:09 zzapper
2013-10-19 14:53 ` Jérémie Roquet
2013-10-19 16:42 ` René Wilhelm
2013-10-19 18:00   ` Nick Cross
2013-10-19 19:11 ` Mark van Dijk
2013-10-20 17:36 ` Valodim Skywalker
2013-10-20 18:06   ` zzapper

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).