-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve find
command for cd widgets: exclude proc/dev
#122
Conversation
Please ignore Travis failure. I momentarily gave up making it work. |
Heh.. :) - I was just wondering. |
Feel free to squash-merge the commits, or tell me to rebase the PR. |
Doh, one thing I noticed is that jg@mbp:~> find . | cut -b3- | head
.agignore
.ansible
.ansible/cp
.ansible/tmp
.ansible/tmp/ansible-1355468543.5-175586869495702
.ansible/tmp/ansible-1355468608.74-15792789855106
.ansible/tmp/ansible-1355468672.32-65045913254503
.ansible/tmp/ansible-1355468717.3-263255040481250
.ansible/tmp/ansible-1355468798.05-74592742241722 We could append |
@@ -369,14 +369,15 @@ function fzf_key_bindings | |||
end | |||
|
|||
function __fzf_list | |||
command find * -path '*/\.*' -prune \ | |||
command find -L ${1:-.} \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fish complains about this:
fish: Did you mean {$VARIABLE}? The '$' character begins a variable name. A bracket, which directly followed a '$', is not allowed as a part of a variable name, and variable names may not be zero characters long. To learn more about variable expansion in fish, type 'help expand-variable'.
Standard input: command find -L ${1:-.} \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
^
Let's just change it to simple .
When using the widget in "/", it would descend into 'dev/'. Using '*' for the starting path would do so also with the new '-fstype' excludes. `cut -b3-` and `sed 1d` have been added to massage the different format of the list. This also uses `-L` with all calls to find, especially for the file finders. Ref: junegunn#122
325032c
to
53d5d9d
Compare
Fish should be fixed now, and I've added |
Improve `find` command for ALT-C: exclude proc/dev
Merged. Thanks! |
When using the widget in "/", it would descend into 'dev/'.
Using '*' for the starting path would do so also with the new '-fstype'
excludes.
The drawback / change now is that the './' prefix is being added, which
I don't mind. This could be fixed by throwing in some
cut -b3-
intothe pipe.