-
Notifications
You must be signed in to change notification settings - Fork 67
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
ls source to list current directory, most recent first #98
base: master
Are you sure you want to change the base?
Conversation
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.
Thanks PR.
The interface for xclip
is good idea, and it will be useful for X11 users. It will be better to supports pbcopy and xsel as possible.
I have two concerns:
- There is
open-file
source to show the result ofls
. - xclip feature should not be the main action for this source.
I hope you add "copy to clipboard" action for open-files
source instead of creating new source, and configure it as default using custom action introduced in #96
|
||
function zaw-src-ls() { | ||
# avoid any alias present by calling full path | ||
savealias=`alias ls` |
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.
Please use local
to restrict scope. You should use command ls
if you concern about alias.
"append filename" "prepend filename") | ||
} | ||
|
||
function strip-ls-long() { |
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.
Please rename to zaw-src-ls-strip
or some name you prefer to restrict name scope.
function zaw-src-ls-append() { | ||
line="$1" | ||
|
||
BUFFER="$BUFFER `print -- $line | strip-ls-long`" |
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.
Please use $LBUFFER
and $RBUFFER
OK, thanks for your review, all very reasonable. |
Hi there. In case you like it, I find it useful, but adds deps to xclip and awk
ciao