Skip to content

Commit

Permalink
Release Upterm 0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
owenthereal committed Dec 4, 2022
1 parent c8dd19e commit 354c8c2
Show file tree
Hide file tree
Showing 22 changed files with 69 additions and 40 deletions.
2 changes: 1 addition & 1 deletion charts/uptermd/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: uptermd
description: Secure Terminal Sharing
type: application
version: 0.2.0
appVersion: 0.9.0
appVersion: 0.10.0
home: https://upterm.dev
sources:
- https://github.com/owenthereal/upterm
Expand Down
2 changes: 1 addition & 1 deletion cmd/upterm/command/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/spf13/cobra"
)

const Version = "0.9.0"
const Version = "0.10.0"

func versionCmd() *cobra.Command {
cmd := &cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion docs/upterm.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ Upterm is an open-source solution for sharing terminal sessions instantly with t
* [upterm upgrade](upterm_upgrade.md) - Upgrade the CLI
* [upterm version](upterm_version.md) - Show version

###### Auto generated by spf13/cobra on 27-Jun-2022
###### Auto generated by spf13/cobra on 3-Dec-2022
6 changes: 3 additions & 3 deletions docs/upterm_host.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ upterm host [flags]
--github-user strings this GitHub user public keys are permitted to connect.
--gitlab-user strings this GitLab user public keys are permitted to connect.
-h, --help help for host
--known-hosts string a file contains the known keys for remote hosts (required). (default "/home/owen/.ssh/known_hosts")
-i, --private-key strings private key file for public key authentication against the upterm server (default [/home/owen/.ssh/id_ed25519])
--known-hosts string a file contains the known keys for remote hosts (required). (default "/Users/owen/.ssh/known_hosts")
-i, --private-key strings private key file for public key authentication against the upterm server (default [/Users/owen/.ssh/id_ed25519])
-r, --read-only host a read-only session. Clients won't be able to interact.
--server string upterm server address (required), supported protocols are ssh, ws, or wss. (default "ssh://uptermd.upterm.dev:22")
```
Expand All @@ -50,4 +50,4 @@ upterm host [flags]

* [upterm](upterm.md) - Secure Terminal Sharing

###### Auto generated by spf13/cobra on 27-Jun-2022
###### Auto generated by spf13/cobra on 3-Dec-2022
2 changes: 1 addition & 1 deletion docs/upterm_proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ upterm proxy [flags]

* [upterm](upterm.md) - Secure Terminal Sharing

###### Auto generated by spf13/cobra on 27-Jun-2022
###### Auto generated by spf13/cobra on 3-Dec-2022
2 changes: 1 addition & 1 deletion docs/upterm_session.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Display session
* [upterm session info](upterm_session_info.md) - Display session by name
* [upterm session list](upterm_session_list.md) - List shared sessions

###### Auto generated by spf13/cobra on 27-Jun-2022
###### Auto generated by spf13/cobra on 3-Dec-2022
2 changes: 1 addition & 1 deletion docs/upterm_session_current.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ upterm session current [flags]

* [upterm session](upterm_session.md) - Display session

###### Auto generated by spf13/cobra on 27-Jun-2022
###### Auto generated by spf13/cobra on 3-Dec-2022
2 changes: 1 addition & 1 deletion docs/upterm_session_info.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ upterm session info [flags]

* [upterm session](upterm_session.md) - Display session

###### Auto generated by spf13/cobra on 27-Jun-2022
###### Auto generated by spf13/cobra on 3-Dec-2022
2 changes: 1 addition & 1 deletion docs/upterm_session_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ upterm session list [flags]

* [upterm session](upterm_session.md) - Display session

###### Auto generated by spf13/cobra on 27-Jun-2022
###### Auto generated by spf13/cobra on 3-Dec-2022
2 changes: 1 addition & 1 deletion docs/upterm_upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ upterm upgrade [flags]

* [upterm](upterm.md) - Secure Terminal Sharing

###### Auto generated by spf13/cobra on 27-Jun-2022
###### Auto generated by spf13/cobra on 3-Dec-2022
2 changes: 1 addition & 1 deletion docs/upterm_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ upterm version [flags]

* [upterm](upterm.md) - Secure Terminal Sharing

###### Auto generated by spf13/cobra on 27-Jun-2022
###### Auto generated by spf13/cobra on 3-Dec-2022
11 changes: 6 additions & 5 deletions etc/completion/upterm.bash_completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ __upterm_handle_go_custom_completion()
# Prepare the command to request completions for the program.
# Calling ${words[0]} instead of directly upterm allows to handle aliases
args=("${words[@]:1}")
requestComp="${words[0]} __completeNoDesc ${args[*]}"
# Disable ActiveHelp which is not supported for bash completion v1
requestComp="UPTERM_ACTIVE_HELP=0 ${words[0]} __completeNoDesc ${args[*]}"

lastParam=${words[$((${#words[@]}-1))]}
lastChar=${lastParam:$((${#lastParam}-1)):1}
Expand All @@ -77,7 +78,7 @@ __upterm_handle_go_custom_completion()
directive=0
fi
__upterm_debug "${FUNCNAME[0]}: the completion directive is: ${directive}"
__upterm_debug "${FUNCNAME[0]}: the completions are: ${out[*]}"
__upterm_debug "${FUNCNAME[0]}: the completions are: ${out}"

if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then
# Error code. No completion.
Expand All @@ -103,7 +104,7 @@ __upterm_handle_go_custom_completion()
local fullFilter filter filteringCmd
# Do not use quotes around the $out variable or else newline
# characters will be kept.
for filter in ${out[*]}; do
for filter in ${out}; do
fullFilter+="$filter|"
done

Expand All @@ -114,7 +115,7 @@ __upterm_handle_go_custom_completion()
# File completion for directories only
local subdir
# Use printf to strip any trailing newline
subdir=$(printf "%s" "${out[0]}")
subdir=$(printf "%s" "${out}")
if [ -n "$subdir" ]; then
__upterm_debug "Listing directories in $subdir"
__upterm_handle_subdirs_in_dir_flag "$subdir"
Expand All @@ -125,7 +126,7 @@ __upterm_handle_go_custom_completion()
else
while IFS='' read -r comp; do
COMPREPLY+=("$comp")
done < <(compgen -W "${out[*]}" -- "$cur")
done < <(compgen -W "${out}" -- "$cur")
fi
}

Expand Down
32 changes: 30 additions & 2 deletions etc/completion/upterm.zsh_completion
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#compdef _upterm upterm
#compdef upterm

# zsh completion for upterm -*- shell-script -*-

Expand Down Expand Up @@ -86,15 +86,32 @@ _upterm()
return
fi

local activeHelpMarker="_activeHelp_ "
local endIndex=${#activeHelpMarker}
local startIndex=$((${#activeHelpMarker}+1))
local hasActiveHelp=0
while IFS='\n' read -r comp; do
# Check if this is an activeHelp statement (i.e., prefixed with $activeHelpMarker)
if [ "${comp[1,$endIndex]}" = "$activeHelpMarker" ];then
__upterm_debug "ActiveHelp found: $comp"
comp="${comp[$startIndex,-1]}"
if [ -n "$comp" ]; then
compadd -x "${comp}"
__upterm_debug "ActiveHelp will need delimiter"
hasActiveHelp=1
fi

continue
fi

if [ -n "$comp" ]; then
# If requested, completions are returned with a description.
# The description is preceded by a TAB character.
# For zsh's _describe, we need to use a : instead of a TAB.
# We first need to escape any : as part of the completion itself.
comp=${comp//:/\\:}

local tab=$(printf '\t')
local tab="$(printf '\t')"
comp=${comp//$tab/:}

__upterm_debug "Adding completion: ${comp}"
Expand All @@ -103,6 +120,17 @@ _upterm()
fi
done < <(printf "%s\n" "${out[@]}")

# Add a delimiter after the activeHelp statements, but only if:
# - there are completions following the activeHelp statements, or
# - file completion will be performed (so there will be choices after the activeHelp)
if [ $hasActiveHelp -eq 1 ]; then
if [ ${#completions} -ne 0 ] || [ $((directive & shellCompDirectiveNoFileComp)) -eq 0 ]; then
__upterm_debug "Adding activeHelp delimiter"
compadd -x "--"
hasActiveHelp=0
fi
fi

if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then
__upterm_debug "Activating nospace."
noSpace="-S ''"
Expand Down
8 changes: 4 additions & 4 deletions etc/man/man1/upterm-host.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.nh
.TH "UPTERM" "1" "Jun 2022" "Upterm 0.9.0" "Upterm Manual"
.TH "UPTERM" "1" "Dec 2022" "Upterm 0.10.0" "Upterm Manual"

.SH NAME
.PP
Expand Down Expand Up @@ -38,11 +38,11 @@ Host a terminal session over a reverse SSH tunnel to the Upterm server with the
help for host

.PP
\fB--known-hosts\fP="/home/owen/.ssh/known_hosts"
\fB--known-hosts\fP="/Users/owen/.ssh/known_hosts"
a file contains the known keys for remote hosts (required).

.PP
\fB-i\fP, \fB--private-key\fP=[/home/owen/.ssh/id_ed25519]
\fB-i\fP, \fB--private-key\fP=[/Users/owen/.ssh/id_ed25519]
private key file for public key authentication against the upterm server

.PP
Expand Down Expand Up @@ -88,4 +88,4 @@ Host a terminal session over a reverse SSH tunnel to the Upterm server with the

.SH HISTORY
.PP
27-Jun-2022 Auto generated by spf13/cobra
3-Dec-2022 Auto generated by spf13/cobra
4 changes: 2 additions & 2 deletions etc/man/man1/upterm-proxy.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.nh
.TH "UPTERM" "1" "Jun 2022" "Upterm 0.9.0" "Upterm Manual"
.TH "UPTERM" "1" "Dec 2022" "Upterm 0.10.0" "Upterm Manual"

.SH NAME
.PP
Expand Down Expand Up @@ -44,4 +44,4 @@ Proxy a terminal session over WebSocket. This must be used in conjunction with S

.SH HISTORY
.PP
27-Jun-2022 Auto generated by spf13/cobra
3-Dec-2022 Auto generated by spf13/cobra
4 changes: 2 additions & 2 deletions etc/man/man1/upterm-session-current.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.nh
.TH "UPTERM" "1" "Jun 2022" "Upterm 0.9.0" "Upterm Manual"
.TH "UPTERM" "1" "Dec 2022" "Upterm 0.10.0" "Upterm Manual"

.SH NAME
.PP
Expand Down Expand Up @@ -47,4 +47,4 @@ Display the current session. By default, the command fetches the current session

.SH HISTORY
.PP
27-Jun-2022 Auto generated by spf13/cobra
3-Dec-2022 Auto generated by spf13/cobra
4 changes: 2 additions & 2 deletions etc/man/man1/upterm-session-info.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.nh
.TH "UPTERM" "1" "Jun 2022" "Upterm 0.9.0" "Upterm Manual"
.TH "UPTERM" "1" "Dec 2022" "Upterm 0.10.0" "Upterm Manual"

.SH NAME
.PP
Expand Down Expand Up @@ -41,4 +41,4 @@ Display session by name.

.SH HISTORY
.PP
27-Jun-2022 Auto generated by spf13/cobra
3-Dec-2022 Auto generated by spf13/cobra
4 changes: 2 additions & 2 deletions etc/man/man1/upterm-session-list.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.nh
.TH "UPTERM" "1" "Jun 2022" "Upterm 0.9.0" "Upterm Manual"
.TH "UPTERM" "1" "Dec 2022" "Upterm 0.10.0" "Upterm Manual"

.SH NAME
.PP
Expand Down Expand Up @@ -41,4 +41,4 @@ List shared sessions. Session admin sockets are located in ~/.upterm.

.SH HISTORY
.PP
27-Jun-2022 Auto generated by spf13/cobra
3-Dec-2022 Auto generated by spf13/cobra
4 changes: 2 additions & 2 deletions etc/man/man1/upterm-session.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.nh
.TH "UPTERM" "1" "Jun 2022" "Upterm 0.9.0" "Upterm Manual"
.TH "UPTERM" "1" "Dec 2022" "Upterm 0.10.0" "Upterm Manual"

.SH NAME
.PP
Expand Down Expand Up @@ -29,4 +29,4 @@ Display session

.SH HISTORY
.PP
27-Jun-2022 Auto generated by spf13/cobra
3-Dec-2022 Auto generated by spf13/cobra
4 changes: 2 additions & 2 deletions etc/man/man1/upterm-upgrade.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.nh
.TH "UPTERM" "1" "Jun 2022" "Upterm 0.9.0" "Upterm Manual"
.TH "UPTERM" "1" "Dec 2022" "Upterm 0.10.0" "Upterm Manual"

.SH NAME
.PP
Expand Down Expand Up @@ -44,4 +44,4 @@ Upgrade the CLI

.SH HISTORY
.PP
27-Jun-2022 Auto generated by spf13/cobra
3-Dec-2022 Auto generated by spf13/cobra
4 changes: 2 additions & 2 deletions etc/man/man1/upterm-version.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.nh
.TH "UPTERM" "1" "Jun 2022" "Upterm 0.9.0" "Upterm Manual"
.TH "UPTERM" "1" "Dec 2022" "Upterm 0.10.0" "Upterm Manual"

.SH NAME
.PP
Expand Down Expand Up @@ -29,4 +29,4 @@ Show version

.SH HISTORY
.PP
27-Jun-2022 Auto generated by spf13/cobra
3-Dec-2022 Auto generated by spf13/cobra
4 changes: 2 additions & 2 deletions etc/man/man1/upterm.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.nh
.TH "UPTERM" "1" "Jun 2022" "Upterm 0.9.0" "Upterm Manual"
.TH "UPTERM" "1" "Dec 2022" "Upterm 0.10.0" "Upterm Manual"

.SH NAME
.PP
Expand Down Expand Up @@ -54,4 +54,4 @@ Upterm is an open-source solution for sharing terminal sessions instantly with t

.SH HISTORY
.PP
27-Jun-2022 Auto generated by spf13/cobra
3-Dec-2022 Auto generated by spf13/cobra

0 comments on commit 354c8c2

Please sign in to comment.