.bashrc function to open a UNIX path with Textpad 5

Instructional HowTos, posted by users. No questions here please.

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
dtoader
Posts: 15
Joined: Thu Feb 22, 2007 9:50 pm

.bashrc function to open a UNIX path with Textpad 5

Post by dtoader »

This post applies to a cygwin environment or a bash on Windows setup.

Code: Select all

# Textpad function
# Pass in a UNIX path
# Starts textpad given a UNIX path argument
function textpad() { 
  local textpadUnixPath="/cygdrive/c/Program Files/TextPad 5/TextPad.exe"
  local textpadArgPath=`cygpath -w -a "$*"`
  "$textpadUnixPath" "$textpadArgPath" &
}
Post Reply