how to alias a program like bbedit in .bashrc?

Jump to First Reply
Posted:
in macOS edited January 2014
how can i alias bbedit in .bashrc ?



i type



alias edit='/applications/bbedit'



save it and source .bashrc,



but when I type edit in x11 or terminal

it says no such file or directory





what's problem here ?



Thanks

Comments

  • Reply 1 of 2
    Marvinmarvin Posts: 15,583moderator
    You can either use the path directly to the binary:



    alias bb='/Applications/bbedit.app/Contents/MacOS/bbedit'



    or



    alias bb='open -a bbedit'



    You have to open a new shell for it to take effect.



    bbedit has command line tools too, if you install them you can open files using the command bbedit something.txt.
     0Likes 0Dislikes 0Informatives
  • Reply 2 of 2
    Thanks, you made my day!



    Quote:
    Originally Posted by Marvin View Post


    You can either use the path directly to the binary:



    alias bb='/Applications/bbedit.app/Contents/MacOS/bbedit'



    or



    alias bb='open -a bbedit'



    You have to open a new shell for it to take effect.



    bbedit has command line tools too, if you install them you can open files using the command bbedit something.txt.



     0Likes 0Dislikes 0Informatives
Sign In or Register to comment.