abbadon420@sh.itjust.works 发于 Ask Lemmy@lemmy.world · 3 个月前Linux question: I like to browse using ls. Than when I find what I'm looking for, I would like to directly move there with cd without having to retype the path. Is there an elegant solution for that?message-squaremessage-square62linkfedilinkarrow-up1128arrow-down11file-text
arrow-up1127arrow-down1message-squareLinux question: I like to browse using ls. Than when I find what I'm looking for, I would like to directly move there with cd without having to retype the path. Is there an elegant solution for that?abbadon420@sh.itjust.works 发于 Ask Lemmy@lemmy.world · 3 个月前message-square62linkfedilinkfile-text
Maybe there is a tool that does that? Maybe I’m doing this all wrong and there is a different way I should browse?
minus-squareHubertManne@piefed.sociallinkfedilinkEnglisharrow-up31·3 个月前so you have better answers but still going to do mine. up arrow and change ls to cd.
minus-squareabbadon420@sh.itjust.works楼主linkfedilinkarrow-up10·3 个月前Yeah, thats what I was doing,but I was hoping for something more elegant haha
minus-squareusernameunnecessary@lemmy.ziplinkfedilinkarrow-up10·edit-23 个月前^ls^cd will do exactly what you want, replace ls with cd from the previously run command
so you have better answers but still going to do mine. up arrow and change ls to cd.
Yeah, thats what I was doing,but I was hoping for something more elegant haha
^ls^cdwill do exactly what you want, replace ls with cd from the previously run command