mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Added Zendesk plugin for opening help desk tickets
Modeled after the Lighthouse plugin but without the need for project-specific URLs.
This commit is contained in:
parent
23e5e83280
commit
4c105b80dc
1 changed files with 16 additions and 0 deletions
16
plugins/zendesk/zendesk.plugin.zsh
Normal file
16
plugins/zendesk/zendesk.plugin.zsh
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# To use: add a .zendesk file into your directory with the URL to the
|
||||
# individual project. For example:
|
||||
# https://help.trabian.com/tickets/8994
|
||||
open_zendesk_ticket () {
|
||||
if [ ! -f ~/.zendesk-url ]; then
|
||||
echo "There is no .zendesk file in the home directory..."
|
||||
return 0;
|
||||
else
|
||||
zendesk_url=$(cat ~/.zendesk-url);
|
||||
echo "Opening ticket #$1";
|
||||
`open $zendesk_url/tickets/$1`;
|
||||
fi
|
||||
}
|
||||
|
||||
alias zo='open_zendesk_ticket'
|
||||
alias ticket='open_zendesk_ticket'
|
||||
Loading…
Add table
Add a link
Reference in a new issue