Sunday, November 15, 2015

get file path in shell using hot key

In the previous post, I wrote about a small shell script I created to copy current working directory (pwd) to clipboard. I have made few modifications to it and now you can select the file name and will get the full path of the file along with the name of the file

bind '"\eOS":"echo -n $(pwd)/$(xclip -o) | xclip -selection clipboard \n"'

Bash is awesome! Automating stuff is so fun!!

No comments:

Post a Comment