Comments (7)
It can fix the problem, and avoid to call cut
to save the time of process fork.
diff --git a/zsh-wakatime.plugin.zsh b/zsh-wakatime.plugin.zsh
index 4d09d41..694c435 100644
--- a/zsh-wakatime.plugin.zsh
+++ b/zsh-wakatime.plugin.zsh
@@ -28,7 +28,12 @@ waka_filename() {
echo "$PWD"
else
# only command without arguments to avoid senstive information
- echo "$history[$((HISTCMD-1))]" | cut -d ' ' -f1
+ for token in ${(s. .)history[$((HISTCMD-1))]} ; do
+ if ! ((token[(I)=])); then
+ echo $token
+ break
+ fi
+ done
fi
}
from zsh-wakatime.
Good one. Will take a look
from zsh-wakatime.
@wbingli If you are busy to review the code, can you add me to collabrators? And transfer this repo to https://github.com/wakatime/ to let the wakatime organization to manage it.
from zsh-wakatime.
Thanks @Freed-Wu
I added you as collaborator for this repo. Feel free to update or merge PR.
And transfer this repo to https://github.com/wakatime/ to let the wakatime organization to manage it.
I would still want to have this repo in my account. Thanks
from zsh-wakatime.
Thanks for your reply!
from zsh-wakatime.
Perhaps you can add @alanhamlett to collaborators. 😄 I think he will be happy to maintain the plugin.
from zsh-wakatime.
haha, absolutely, done!
from zsh-wakatime.
Related Issues (15)
- waka_filename:1: = not found HOT 2
- receiving error message: Permission denied (publickey) HOT 1
- Command not found: add-zsh-hook HOT 11
- Changing directory using "-" causes argument --entity is required error
- Support for Prezto HOT 5
- can't download zsh 6.0 or higher... HOT 2
- Not working? HOT 4
- Doesn't this read sensitive information too like passwords and configs typed? HOT 3
- Non-terminal tasks being tracked HOT 3
- send_wakatime_heartbeat:3: nice(5) failed: operation not permitted HOT 1
- Does not seem to log HOT 2
- How do I undo this command? HOT 4
- By default, $PATH is not set and an alias is not set either HOT 1
- [bug] lose `.git`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zsh-wakatime.