Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Appending in a switch case statement

by rir (Vicar)
on Dec 22, 2008 at 20:05 UTC ( [id://732182]=note: print w/replies, xml ) Need Help??


in reply to Appending in a switch case statement

<Update> I meant to include my reason for not just using CDPATH. I play around in directory trees like: $HOME/<projectname>/(source|target)/<modulename>/CPAN_structured_tree where I am usually in the bottom of one project's source tree, and occasionally want to jump to the sister-directory in the target or into the source of a different project. I use shell history and a few exported variable names for directories.
</Update>

For background, I ran across this cute alias which I never use:

realias='$EDITOR ~/.aliases; source ~/.aliases'
In the case you give, I use exported variables and cd. I've never felt the need to have my environment evolve so rapidly that I couldn't use an editor in a spare screen to edit my .bashrc. So I would just:
$ export tmp=/tmp $ cd $tmp
To make this more suited to your style, I'd blend this together into something like:
function reexport { echo export "$*" >> $HOME/.exports; source $HOME/.exports; }
Given that you perl, perhaps you can stand some dollar signs.

Be well,
rir

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://732182]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (7)
As of 2024-04-16 10:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found