Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I usually want to be told when I typo part of the path. And, since I'm in vim, it isn't hard to expand "MD=foo/bar/baz" to add "MD=foo" and "MD=foo/bar". But I can see wanting to avoid such machinations. Perhaps MP= makes sense.

As I was posting this, I briefly wondered why I hadn't added support for creating symbolic links (other than "never needed it, yet"). Thinking about it more now that you've asked, I see some problems with supporting such. There are lots of ways to make a symbolic link that points to an existing file or directory and I don't yet see a clear way to distinguish between the cases via this interface.

Consider "mvi foo/*" and then changing "=foo/bar" to "S=foo/baz". You probably want the equivalent of

% ln -s bar foo/baz % readlink foo/baz bar %

not "readlink foo/baz" returning "../foo/bar" nor "/whatever/path/we/are/in/foo/bar". But if you did want one of those, how would specify it?

Maybe I should just assume that people either want relative symlinks or absolute symlinks and, when making relative symlinks, remove as many instances of ".." as possible? Then you could say "RS=foo/baz" or "AS=foo/baz". That'd be easier than actually trying to get the invocation of "ln -s" correct on the first try (which is extra hard for me since I personally always think that the arguments to "ln -s" should go in the other order for some reason).

I'd probably never use "ln -s" directly again. Yeah, I think I really need to implement this.

Thanks for the suggestions!

- tye        


In reply to Re^2: mvi -- mv+vi (+ln+rm+cp+mkdir) (ln -s, mkdir -p) by tye
in thread mvi -- mv+vi (+ln+rm+cp+mkdir) by tye

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-19 23:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found