Trying to learn zsh completion. Help me achieve it?

Hi,
I'm trying to learn to write completion functions for zsh, and started by writing one for unison, which looks in the profiles directory to tab-complete profiles. So far, I've got a _unison file containing the following:
#compdef unison
#typeset -A opt_args
local profiles
profiles=~/.unison
_files -W ${profiles} -g '*.prf' && return 0
return 1
Which works relatively well:
% unison <tab>
default.prf documents.prf photographs.prf
Just for the fun of it really, I'd like to remove the .prf bit and just have it complete the basename. Any idea how I can achieve this?
Thanks :-)

I don't think 'basename' is the right word.
This works for bash:
for i in *.txt; do echo ${i%%.*}; done
Now you have to somehow add it to your workflow.

Similar Messages

  • Old School trying to learn New School HELP!

    Once upon a time, a long long time ago I created a web site for the toy Furby based upon the things my five children and I discovered about the doll.
    This site was created by learning HTML and doing all coding by hand.
    The history of the site is mentioned on some web pages today, (google "Furbyinfo.com" for details.
    Now here we are some 11 years later and I find myself once again learning HTML and am confused by the plethora of acronyms, style sheets, java scripts, and so on.  I purchased Dreamweaver 5 and I was hoping this would make my journey down the HTML memory lane much easier but in fact, I am not finding this to be true.
    So I bought a book "Sams teach yourself Dreamweaver CS5" in 24 hours...  Well I have been reading it for 3 weeks now Sam and I ain't getting much better...
    So I bought another book, "Adobe Dreamweaver CS5 Bible"  Yeah, it's a lot like reading the Real Thing, In the book of Joeseph Lowery Chapter 3 verse 17 I am sure I might find the knowledge I seek, but today, I can't seem to fix what I thought should be easy.
    Specifically I thought CSS was a way to define something "site wide" so that you only have to edit the content and not the colors, fonts, etc...
    Well I must be doing something wrong because none of my 7 or 8 pages are uniform.
    Now too, depending on the type of browser viewing my site you get my right sidebar appearing down below my left sidebar.
    If I add a page and put its link on the index page of my site, I find I have to manually add the link on the left nave bar to every page.
    It is tedious, and not intuitive at all.
    My email address is [email protected] if anyone would care to mentor me perhaps we could trade training for content writing.
    I am an excellent writer and given a subject I can fill pages with informative words designed to keep the attention of a reader, but for the life of me I can't seem to make my website sexy.
    Please help
    www.thecollectivecloud.com
    Thank You.
    Leah T

    This should really help you: http://www.w3schools.com/

  • I have a new iPhone 5S.  While trying to learn about it, I accidentally recorded a voice memo with no content.  I cannot now figure out how to get rid of it.  There is a banner across the top of my phone with this memo which I don't want.  Help!

    I have a new iPhone 5S.  While trying to learn about it, I accidentally recorded a voice memo with no content.  I cannot now figure out how to get rid of it.  There is a banner across the top of my phone with this memo which I don't want.  I have deleted it from iTunes but cannot get it off the phone.  Help!

    The banner usually indicates that the memo is "Paused." If you go back into voice memos, touch the word "Done" beside the big red pause button, give it a name, then it will show in a list. Touch the memo in the list then touch the trash can icon that should appear.

  • I have had LR4 since last August.Have just decided to start using it.I have an IMAC 10.9.3 version. Am trying to learn with "Classroom in a Book. Ton of  problems.Adobe will not help because it is to old and they no longer support. Can anyone tell where I

    Did anyone see the post I made about LR 4?Just in case I will post again. I have LR4 I bought last August and just now I am trying to learn this >I have "Classroom in  a Book" for LR4 lots of problems . I have a IMAC version 10.9.3. I tried different Adobe sites. They will not give me the Time of day because they say they no longer support this program. Can anyone here tell me where I can get support for this LR$ that Adobe no longer recognizes. Thank you My name is Jerry S. MY e-mail is [email protected] and phone number is 563-344-7910.

    Okay I will try. First I have lost pictures in catalogs and could not find again.I have tried reinstalling LR4 and when I do and reopen LR4 the same catalog appears in the panel and filmstrip and I have no idea how to get rid of that catalog and start over at square one like it was the frist time it was opened. That would be a big help and I think I start over and avoid the same problems.

  • Hi, I've just started as a fresher in sap fico and I'm upto the LSMW part and I'm wondering why I keep getting an error in Run batch step when I do everything else correct could you help?  Please help I'm really trying to learn it as fast as possible

    Please help I'm really trying to learn it as fast as possible?  I've posted the file with all my screen shots going through the enitre process of me creating the LSMW file.

    First, I will try to address the iPod issue: If youve tried EVERYTHING on the website, your only other option is probably to contact Apple, I recommend by phone, and informing them of the problem. You are covered by warranty and therefore they are liable to assist you. Try that and come back with a status update
    Now I will address your attitude about it:Its absolutely understandable to be upset over something like this, especially with such an expensive product, but you are generalizing far to much. You may think Apple is being unproffesional by not warning potential buyers of the iPods common faults, but do you really think they would? they are out to sell these things, they arent going to point out the bad in their product. And not all iPods have problems, in fact only a fraction do. That gopes for the rest o Apples products as well. You are too hasty assuming all Apple products are junk, and one of many reasons as to why that is unfair of you is becuase you dont own any other Apple products.

  • HT4783 I'm trying to learn how to use Airdrop between my wife's Mac and mine. We both have it, but this article did not help us learn HOW to share files.  Yippeee that we can...but HOW?

    My wife and I are trying to learn how to use Air Drop.  The "tutorial" showed us where it is.  It came up.  I saw hers (Mac).  She saw mine (Mac). But where to go after that is, apparently, in the cloud somewhere.  The description says we can share files...which is nice...but nothing tells us HOW to share those files. 
    Thanks for your help out there...
    Dennis

    1. Open a new Finder window or use one that's already open
    2. Click on Airdrop, press Shift+Command+R, or find "Airdrop" in the "Go" menu
    3. Drag your file to the icon of the person you want to send the file to (if you have mountain lion, you can use the share button).
    4. The other person has to click "save"
    5. The file will send and appear in the receiver's downloads folder
    In Mountain Lion, a new feature was added: the share button. It's a button with a picture of a box and an arrow jumping out of it. Click on it and the third (and last) option is "Airdrop" and clicking on it will allow you to send files over Airdrop without opening it in Finder.

  • Hi im trying to sign into my new icloud account but it keeps saying "this operation cannot be completed" help, hi im trying to sign into my new icloud account but it keeps saying "this operation cannot be completed" help

    hi im trying to sign into my new icloud account but it keeps saying "this operation cannot be completed" help, hi im trying to sign into my new icloud account but it keeps saying "this operation cannot be completed" help.

    Have you looked at the previous discussions listed on the right side of this page under the heading "More Like This"?

  • I'm trying to Export my completed video; however, the Export option is grayed out in the File Menu.

    I'm trying to Export my completed video; however, the Export option is grayed out in the File Menu.  What am I not doing?

    GregEW2
    Thanks for the follow up.
    From what you wrote, you have Premiere Elements 10. Is that on Windows 7 64 bit or other. For now I will assume Windows 7 64 bit. If version 10 is on Windows 7 or 8 64 bit it is a 64 bit application running in the 64 bit system which makes it possible for full use of the 64 bit resources. That is good news especially when you are trying to take a large project to completion.
    You set up the project preset in the new project dialog to match the properties of your source media. That setting directs the program to establish the right space in the Edit Mode Monitor for editing purposes. That project preset also directs the program as to what disc menu set (s, w, or hd) will be available to you in the disc menu section. The project preset also has more subtle effects on the project settings.
    What is you plan for exporting your Timeline, export to file saved to the computer hard drive or burn to disc DVD or Blu-ray? Keep in mind that the setting for the project preset do not prohibit variations in the export choice under most conditions. If you post a description of your source media and how you would like to export it, I will offer some very specific guidelines on that.
    If you do go the purchased book route, please try for one which is specific to your version 10. There has been a marked change in interface starting with version 11. Often principles remain the same from version to version, but features do not. And, I always write "It is very frustrating to be armed with principles when you cannot find a feature."
    I suggest that you start with the Premiere Elements 10 Help PDF and then decide what next.
    http://help.adobe.com/en_US/PremiereElements/10.0/Using/index.html
    Also check out
    http://tv.adobe.com/show/learn-premiere-elements-10/
    A lot of these links that say version 10, roll over to 11.
    Steve Grisetti, the moderator of this forum, writes books on Premiere Elements if you are interested in the purchased book route.
    Hope the information above is helpful. Above all do not hesitate to ask if you have questions on your Premiere Elements workflow or need clarification on anything written.
    Thanks.
    ATR
    Add On...
    I did not see SG's post before I submitted this reply to you.

  • HT4528 My apps store will not go online with verizon network, but on wifi it works. I am on an iphone 4, verizon.  I tried to do a complete, backup and restore on the phone 1 day before i noticed this problem,  The backup finished the RESTORE would fail c

    My apps store will not go online with verizon network, but on wifi it works. I am on an iphone 4, verizon.  I tried to do a complete, backup and restore on the phone 1 day before i noticed this problem,  The backup finished but the RESTORE would fail I had an error, could not access Apple server ( some server name I cant remember).
    I have plenty of space available on the iphone,
    8gb free,
    ios version- 6.1.3 ( 10B329)
    carrier - Verizon 14.0
    Modem Firmware - 3.0.04
    Can someone help.
    I tried doing my backup restore on the same computer as I once did a year ago. and THis time I cant do the restore on the iphone.
    computer osx is 10.5.8
    itunes version 10.
    I do not wish to go to ios 7 at this time.

    Settings > General > Reset > Reset Network Settings.
    Basic troubleshooting is reset, restart, restore (first from backup then as new).  Try each of these in order until the issue is resolved.
    If the issue continues, contact the carrier to troubleshoot the network connectivity issues.

  • Trying to learn about threads

    Hi guys,
    I'm trying to learn more about threads......i've written a small program for a better understand, but i don't understand the order of the output i'm getting:
    public class testme {
    public static void main(String[] args) {
    Theshape mover = new Theshape("go");
         mover.start();
    System.out.println ("checkpoint 1");
    System.out.println ("checkpoint 2");
         }//main
    }//class testme
    class Theshape extends Thread {
    public int count;
    public String thego;
    Theshape (String gg){
         thego= gg;
    count=0;
    }//constructor
    public void run(){
    try {
    do{
    System.out.println (thego);
    sleep(1000);
    System.out.println ("johnny");
    count=count+1;
    }while(count<8);
    } catch (InterruptedException e) {}
    }//run          
    }//class theshape
    ........the output i get is:
    checkpoint 1
    checkpoint 2
    go
    johnny
    go
    johnny
    go
    johnny
    go
    johnny
    go
    johnny
    go
    johnny
    go
    johnny
    go
    johnny
    I would like to know why "checkpoint 1" and "checkpoint 2" is printed first, even though the call to the run method is made before the two statements. i would have thought that the two checkpoint statements would be printed last.
    Can anyone help?
    Thanks,
    Zaf

    After you've issued the 'mover.start()' call, a new thread pops into existence. The first thread (your main thread) continues to run while the second thread prepares itself to start up. On your machine, this startup takes a (little) while, so your main thread is able to print those two line just before the other thread is able to print something. That's all there is to it. If you put a 'Thread.sleep(1234)' between those two println statements in your main thread, the output would probably be a bit different. Give it a try.
    kind regards,
    Jos

  • Trying to learn to code div tag so that i can make 3 columns

    Hello,
    I am trying to learn how to work with the code for div's in Dreamweaver.
    I have a id for the main container named wrapper that is 900px wide and I have 3 div's inside of it that are just long blocks of type . Each div (#history, #attitudes, #per) is 300px wide with the height falling to accommodate the type. I want then next to each other, and right now they are just one long column with the 3 sections..each have a different background color. Here is the code so far...I am trying to play with the float and positioning but nothing I do works.  In the End, it should just be 3 columns of type next to each other. Each column has one header tag for the topic name and the rest is just using the p body tag. can someone help me get the columns next to one another using the code?
    thanks!
    babs
    #wrapper{
    width:900;
              background-color:#CCCC66;
    #history{
              width:300px;
              height:80px;
              background-color:#FF9999;
    #attitudes{
              width:300px;
              height:80px;
              background-color:#ccFF99;
    #per {
              background-color:#FFFF99;
              width:300px;
              height:80px;
    Here is an image to see them on top of one another....I jusyt want them side by side.....

    Copy & paste this code into a new, blank document in code view.  Save and preview in browsers.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 document</title>
    <style>
    body {
        margin:0;
        padding:0;
        font-family:"Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", Verdana, sans-serif;
        font-size:16px;
    #wrapper {
    width: 900px;
    margin: 0 auto;
    background-color: #CCCC66;
    overflow: hidden;  /**float containment**/
    /**three columns**/
    #history, #attitudes, #per {
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    float: left;
    width: 33.33%;
    min-height: 80px;
    padding:12px;
    #history { background-color: #FF9999; }
    #attitudes { background-color: #CCFF99; }
    #per { background-color: #FFFF99; }
    </style>
    </head>
    <body>
    <div id="wrapper">
    <div id="history">
    <h3>History</h3>
    <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris vitae libero lacus, vel hendrerit nisi!
    Maecenas quis velit nisl, volutpat viverra felis.
    Vestibulum luctus mauris sed sem dapibus luctus.
    Pellentesque aliquet aliquet ligula, et sagittis justo auctor varius. Quisque varius scelerisque nunc eget rhoncus. Aenean tristique enim ut ante dignissim. </p>
    </div>
    <div id="attitudes">
    <h3>Attitudes</h3>
    <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris vitae libero lacus, vel hendrerit nisi!
    Maecenas quis velit nisl, volutpat viverra felis.
    Vestibulum luctus mauris sed sem dapibus luctus.
    Pellentesque aliquet aliquet ligula, et sagittis justo auctor varius. Quisque varius scelerisque nunc eget rhoncus. Aenean tristique enim ut ante dignissim. </p>
    </div>
    <div id="per">
    <h3>Per</h3>
    <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris vitae libero lacus, vel hendrerit nisi!
    Maecenas quis velit nisl, volutpat viverra felis.
    Vestibulum luctus mauris sed sem dapibus luctus.
    Pellentesque aliquet aliquet ligula, et sagittis justo auctor varius. Quisque varius scelerisque nunc eget rhoncus. Aenean tristique enim ut ante dignissim. </p>
    </div>
    <!--end wrapper--></div>
    </body>
    </html>
    Nancy O.

  • Trying to learn Spry Framework Ajax

    So I am trying to learn how to use Spry Framwork for Ajax;
    which I downloaded from
    http://labs.adobe.com/technologies/spry/
    Does anyone know if this some how plugs into Dreamweaver 8 or
    if I wish to use it, "the Photo Gallery to be specific", that I
    have to manually manipulate the code to use my photos and then
    implement their html into my template?

    With DW8, you will have to use the Spry Framework manually.
    It's built into
    the new Dreamweaver CS3.
    Nancy Gill
    Adobe Community Expert
    Author: Dreamweaver 8 e-book for the DMX Zone
    Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
    2003)
    Technical Editor: DMX 2004: The Complete Reference, DMX 2004:
    A Beginner''s
    Guide, Mastering Macromedia Contribute
    Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
    Web Development

  • HT1386 As soon as I plug my iphone4 (running 4.3.3) into my pc, it appears in the left hand column and the little wheel starts turning. Then it stops after a few seconds and itunes freezes. I have tried everything. Can anyone help. Thanks

    As soon as I plug my iphone4 (running 4.3.3) into my pc, it appears in the left hand column and the little wheel starts turning. Then it stops after a few seconds and itunes freezes. I have tried everything. Can anyone help. Thanks

    Hi Patrick,
    Yes, a very frusterating issue indeed. Someone else had mentioned a possible issue with real player, I tried getting rid of that and same issues. I even got completely rid of firefox for the moment. Guess what, problem still is persisting. I think this means it maybe something else altogether. I will go back to re-add firefox after I get this straightened out but now using Chrome for the moment.
    What I've also found out is that the sound can be restarted when I unplug and replug in the 3.5mm speaker cable from the audio output jack on the back of the computer. Any ideas?
    Thanks!

  • New Designer Trying To learn

    Hi all,
    I am new to the field of ID. I have been an educator for 10
    years but am trying to learn as much about all the e-learning
    software that is available, Captivate, Camtasia, Articulate, etc.
    Does anyone have any suggestions for getting that first job or
    contract? It seems that they all want experience (at least 3
    years). I feel like a kid coming out of college again. Does anyone
    have any ideas or any projects that I can "intern" on or work on so
    that I can get some experience or solid things to create a
    portfolio with?
    Any suggestion provided is helpful to me.
    Thanks in advance.
    Rob

    Where are you located?
    rokenn3rd wrote:
    > Does anyone have
    > any ideas or any projects that I can "intern" on or work
    on
    Erik Lord
    http://www.capemedia.net
    Adobe Community Expert - eLearning
    http://www.adobe.com/communities/experts/
    http://www.awaretips.net -
    Authorware Tips!

  • Where can I download the complete help file?

    I just need complete help file.
    because I have had a version2.0 for Japanese.
    who can tell me how to get complete help file.

    I am trying to download the JDK 1.3 from the url
    www.java.sun.com. the actual file is 31.7MB but after
    downloading upto 20.7MB the the process is getting
    discontinued. The same is the case if I try to
    download JDK 1.4.2_06( actual size is 51.5MB but am
    able to get only 22MB. Can any body suggest the
    reason for this problem and also a solution for this.
    I would like to have a link where in I can download
    the complete JDK exe file. Please help out.
    thanks.rfug

Maybe you are looking for