Skip to content
Snippets Groups Projects
Commit 922081b6 authored by Jack Chen (chendo)'s avatar Jack Chen (chendo)
Browse files

Basic functionality still works even if the shell isn't setting window titles

parent 87aa8953
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -5682,6 +5682,11 @@ static bool IsUrlChar(NSString* str)
}
 
- (NSString *)getWorkingDirectoryAtLine:(long long) line {
// Return current directory if not able to log via XTERMCC_WINDOW_TITLE
if ([workingDirectoryAtLines count] == 0) {
return [[dataSource shellTask] getWorkingDirectory];
}
long long previousLine = [[[workingDirectoryAtLines lastObject] objectAtIndex:0] longLongValue];
long long currentLine;
Loading
Loading
Loading
Loading
@@ -11,12 +11,21 @@ You can also use Command + drag and it will turn it into a draggable
file handle, which you can drop in any OSX app. Pretty rad, no?
 
## Instructions
Just [Download](https://github.com/chendo/iTerm2/archives/master) (or build your own,
if you're paranoid or you want the newest features), and off you go!
[Download](https://github.com/chendo/iTerm2/archives/master) (or build your own,
if you're paranoid or you want the newest features).
 
Works with MacVim, Textmate and BBedit (it searches for editor in that
order)
 
If you want it to work even when changing between directories, your
shell must set a window title every time your prompt shows up. I'm using
this as a hook cause it seemed the most appropriate. If you
have oh-my-zsh, then it works out of the box.
Other zsh users, see [termsupport.zsh](https://github.com/robbyrussell/oh-my-zsh/blob/master/lib/termsupport.zsh).
Other shell users, see [here](http://www.faqs.org/docs/Linux-mini/Xterm-Title.html#toc4).
## Operation
* Command + Click opens the file if it is text in
MacVim/Textmate/BBedit, otherwise opens with associated program.
Loading
Loading
@@ -37,6 +46,7 @@ receive the full path and the line number (if any) as arguments.
## Cavets
* Does not work with paths with spaces (for now).
* No configuration options (for now).
* Changing support doesn't work out of the box.
 
## Known issues
* Drag detection is way too sensitive. Even one pixel makes it think
Loading
Loading
@@ -52,6 +62,9 @@ receive the full path and the line number (if any) as arguments.
 
## Changelog
 
### alpha 3:
* Basic functionality still works if shell isn't setting window title
### alpha 2:
* Now works when the working directory is not valid for old paths in the
buffer
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment