Hspasta wrote:Other shell support (zsh) planned?
I may do this at some point in the future, but not now, as I do not use or know anything about zsh.
If someone else would convert the script one time to zsh, I would integrate and maintain it.
@mattd
Although American_Jesus posted his work here. You may try that.
$ s.stop ntpd.service :: Stopping ntpd daemon[sudo] password for aj: sudo: systemctl -q stop ntpd.service: command not found [FAIL] sudo: systemctl status ntpd.service: command not found
seems like /usr/bin/ is not in your $PATH when you use sudo. I will change the call to fullpath /usr/bin/systemctl in the future.
also s.start TAB are not working
btw here's a more clean workaround
if [ "$SHELL" == "/bin/zsh" ]; then complt="compdef" else complt="complete -F" fi $complt s_bashcompletion_start s.start $complt s_bashcompletion_stop s.stop $complt s_bashcompletion_restart s.restart $complt s_bashcompletion_reload s.reload $complt s_bashcompletion_enable s.enable $complt s_bashcompletion_disable s.disable $complt s_bashcompletion_status s.status $complt s_bashcompletion_wants s.wants $complt s_bashcompletion_log s.log
Supported Shells
- bash
American_Jesus wrote:some stuff are not working with that workaround like s.{start,stop,enable,...} daemon.service, i'll try something else
when i got it working properly i make a fork of the repo and send some patchesCould you be a little more specific? What exactly is not working, what error-messages do you get?
start/stop or enable/disable units, not work with that workaround
$ s.stop ntpd.service
:: Stopping ntpd daemon[sudo] password for aj:
sudo: systemctl -q stop ntpd.service: command not found
[FAIL]
sudo: systemctl status ntpd.service: command not found
also s.start TAB are not working
btw here's a more clean workaround
if [ "$SHELL" == "/bin/zsh" ]; then
complt="compdef"
else
complt="complete -F"
fi
$complt s_bashcompletion_start s.start
$complt s_bashcompletion_stop s.stop
$complt s_bashcompletion_restart s.restart
$complt s_bashcompletion_reload s.reload
$complt s_bashcompletion_enable s.enable
$complt s_bashcompletion_disable s.disable
$complt s_bashcompletion_status s.status
$complt s_bashcompletion_wants s.wants
$complt s_bashcompletion_log s.log
Dude, as you can see, the last update here in this post is: moved source to github.
Probably my fault, because I ordered the changes wrong, sorry.
Right but your DTS on that is only 7 days ago whereas the code in the github is 8 days old. I got the impression that you had some uncommited changes.
But before I can do that I must turn my computer on, is that right? Can you please explain that too.
Sorry, I'm in a pissy mood. No offence was intended. You clearly have a good handle on scripting. I just wanted to give you a code snipette to help in case you haven't used github before.
]]>yaffare wrote:Update: 2012-10-22 19:25:52
- code cleaning
- minor changesUpdate: 2012-10-23 13:26:38
- mini bugfix, thx @theDOC
- separate script and configuration
- added AUR-PackageUpdate: 2012-10-24 22:30:14
- moved source to github@Yaffare - Since your AUR package pulls from your github, people are not benefiting from the changes you outlined above because the code in your github repo is 8 days old.
Dude, as you can see, the last update here in this post is: moved source to github.
Probably my fault, because I ordered the changes wrong, sorry.
I have not been making any changes to the code since then, because for me, the script is working very well on serveral machines. Also I havent gotten any bug-reports or pull requests, so there was no reason for me to change the code.
You gotta push ever change you make. Here is a helpful alias you can add to your shell rc (~/.bashrc I'm guessing) that does this for you. Just be sure you're in the /path/to/local/repo when you call it:
alias gitc="git commit -av ; git push -u origin master"
But before I can do that I must turn my computer on, is that right? Can you please explain that too.
]]>some stuff are not working with that workaround like s.{start,stop,enable,...} daemon.service, i'll try something else
when i got it working properly i make a fork of the repo and send some patches
Could you be a little more specific? What exactly is not working, what error-messages do you get?
]]>Update: 2012-10-22 19:25:52
- code cleaning
- minor changesUpdate: 2012-10-23 13:26:38
- mini bugfix, thx @theDOC
- separate script and configuration
- added AUR-PackageUpdate: 2012-10-24 22:30:14
- moved source to github
@Yaffare - Since your AUR package pulls from your github, people are not benefiting from the changes you outlined above because the code in your github repo is 8 days old. You gotta push ever change you make. Here is a helpful alias you can add to your shell rc (~/.bashrc I'm guessing) that does this for you. Just be sure you're in the /path/to/local/repo when you call it:
alias gitc="git commit -av ; git push -u origin master"
some stuff are not working with that workaround like s.{start,stop,enable,...} daemon.service, i'll try something else
when i got it working properly i make a fork of the repo and send some patches
Delete your fork -- Yaffare hasn't been keeping his github in sync with his releases per his changelog in his original post.
]]>if [ "$SHELL" == "/bin/zsh" ]; then
compdef s_bashcompletion_start s.start
compdef s_bashcompletion_stop s.stop
compdef s_bashcompletion_restart s.restart
compdef s_bashcompletion_reload s.reload
compdef s_bashcompletion_enable s.enable
compdef s_bashcompletion_disable s.disable
compdef s_bashcompletion_status s.status
compdef s_bashcompletion_wants s.wants
compdef s_bashcompletion_log s.log
else
complete -F s_bashcompletion_start s.start
complete -F s_bashcompletion_stop s.stop
complete -F s_bashcompletion_restart s.restart
complete -F s_bashcompletion_reload s.reload
complete -F s_bashcompletion_enable s.enable
complete -F s_bashcompletion_disable s.disable
complete -F s_bashcompletion_status s.status
complete -F s_bashcompletion_wants s.wants
complete -F s_bashcompletion_log s.log
fi
Works only with s.TAB
]]>Would you mind putting it on girhub.
+1
]]>