Monday 17 December 2018

shell - put in bash or zsh history absolute path to files I working on

I have found that in bash i frequently use something like that:



  • vim ./somefile1 less

  • less ./dir1/dir2/somefile2

  • cp some_other_relative_path_to_file


and so on


After that when I trying to find a command in history and run it I get an error because I am in a different directory now. Is it possible to configure bash to "expand" relative path to files with absolute one when they go to history?

No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...