1 Comment
Guest *baptiste auguie* @ 2018-08-04 22:17:32 originally posted:
thanks for the tip; I've often wanted a shortcut for system("open .") on my mac,
delayedAssign('open', {
system('open .')
invisible(getwd())
})
The problem is that it only works once (I guess you are aware of that). Once the delayed assignment is fulfilled, open will be getwd(), and it won't open the directory again if you run open in the console.
Originally posted on 2018-08-05 02:21:40
Guest *baptiste auguie* @ 2018-08-05 02:47:23 originally posted:
yes :( found out after I posted this
Guest *Michael* @ 2018-08-06 19:03:08 originally posted:
makeActiveBinding would work here:
makeActiveBinding("open", function(){
system('open .')
invisible(getwd())
}, .GlobalEnv)
Sign in to join the discussion
Sign in with GitHub