Skip to content
Snippets Groups Projects
Commit 1d2b4061 authored by George Nachman's avatar George Nachman
Browse files

Merge branch 'master' of github.com:gnachman/iTerm2

Conflicts:
	FindViewController.m
	Headers/iTerm/VT100Screen.h
	PTYScrollView.m
	Trouter.h
	Trouter.m
parents b6e788b3 2808b2e6
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -142,6 +142,7 @@ static const float FINDVIEW_DURATION = 0.075;
}
 
- (void)open
{
{
[[self view] setFrame:[self collapsedFrame]];
[[self view] setHidden:NO];
Loading
Loading
# iTerm2 with Semantic History
### Extremely alpha, but works well.
## Watch the [thirty second screencast](http://vimeo.com/21872771)
Ever wanted to be able to click on paths to open things in a shell?
Well, now you can! Just hold Command and click on the path in the shell.
It'll even open it to the right line if it looks like filename.ext:line_number.
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
[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.
* Command + Drag gives you a file handle you can drop on any app that
supports drag and drop (pretty much everything).
* Command + Shift + Click on a directory does `cd <path>; ls`
## Customisation
If you don't use MacVim, Textmate or BBedit or if you want write
specific parsers, you can have the path sent to an external script of
your choice.
`defaults write com.googlecode.iterm2 SemanticHistoryHandler <path to script>`
The script must be marked executable (`chmod +x <file>`) and it will
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
it's a drag. Will be fixed in next alpha.
## TODO
* Make paths work even after the directory has been changed.
* Configuration options
* More modifier keys: e.g.,
* Shift + Command + Click on a foo_spec.rb:88 does `spec foo_spec.rb -l 88`
* Native support for other editors (TextWrangler, JEdit, Emacs, Rubymine)
* Quicklook support
## 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
* Command + Drag lets you drag file/directory handles into any OSX app
* Command + Shift + Click does `d <path>; ls`
* External script support
* Built with llvm/clang for slight performance increase
* Scrolling with wheel always move at least one line.
* Native BBedit support
### alpha 1:
* Command + Click to open implemented for Textmate and MacVim
Jack Chen (@chendo)
File added
File added
File added
File added
File added
File added
File added
File added
File added
Loading
Loading
@@ -8,7 +8,11 @@
**
** Project: iTerm
**
<<<<<<< HEAD
** Description: Semantic History
=======
** Description: Terminal Router
>>>>>>> 2808b2e68677ff4617914613460ef327460f1ddd
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
Loading
Loading
@@ -33,18 +37,16 @@
NSString *externalScript;
}
 
- (Trouter*)init;
- (void)dealloc;
- (void)determineEditor;
- (BOOL)applicationExists:(NSString *)bundle_id;
- (BOOL)applicationExists:(NSString *)bundle_id path:(NSString **)path;
- (BOOL)isTextFile:(NSString *)path;
- (BOOL)file:(NSString *)path conformsToUTI:(NSString *)uti;
- (BOOL)isDirectory:(NSString *)path;
- (NSFileManager *)fileManager;
- (NSString *)getFullPath:(NSString *)path
workingDirectory:(NSString *)workingDirectory
lineNumber:(NSString **)lineNumber;
- (void)openPath:(NSString *)path workingDirectory:(NSString *)workingDirectory;
- (Trouter*) init;
- (void) dealloc;
- (void) determineEditor;
- (BOOL) applicationExists:(NSString *)bundle_id;
- (BOOL) applicationExists:(NSString *)bundle_id path:(NSString **)path;
- (BOOL) isTextFile:(NSString *)path;
- (BOOL) file:(NSString *)path conformsToUTI:(NSString *)uti;
- (BOOL) isDirectory:(NSString *)path;
- (NSFileManager *) fileManager;
- (NSString *) getFullPath:(NSString *)path workingDirectory:(NSString *)workingDirectory lineNumber:(NSString **)lineNumber;
- (void) openPath:(NSString *)path workingDirectory:(NSString *)workingDirectory;
 
@end
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:iTerm.xcodeproj">
</FileRef>
</Workspace>
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