Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c7f0e75
update some README.md
blacknon Apr 10, 2026
0268a84
update. add -D and -B.
blacknon Apr 10, 2026
f6ae7ae
update. add sshconfig update and lsshell debug.
blacknon Apr 10, 2026
8092b20
update. add sshconfig update.
blacknon Apr 10, 2026
edcd4ed
update. add sshconfig update, and add supported yaml config
blacknon Apr 10, 2026
0eafc6a
update. add sshconfig update, and add supported yaml config.
blacknon Apr 10, 2026
2724d98
update shell completion
blacknon Apr 10, 2026
8256dae
update.
blacknon Apr 10, 2026
0bd7671
update.
blacknon Apr 10, 2026
3cef6a1
update.
blacknon Apr 10, 2026
7bc366b
update.
blacknon Apr 11, 2026
46a45ef
update.
blacknon Apr 11, 2026
33cecc1
update.
blacknon Apr 11, 2026
25e7303
update.
blacknon Apr 11, 2026
8450777
update.
blacknon Apr 11, 2026
a548434
update. change version
blacknon Apr 11, 2026
a07bbdf
update. change version.
blacknon Apr 11, 2026
dd84d9f
update. something update
blacknon Apr 11, 2026
0ffdb17
update. Delete empty README
blacknon Apr 11, 2026
c4af04f
update. add some test
blacknon Apr 11, 2026
5bb5de9
update. add some test
blacknon Apr 11, 2026
1ad4d4f
update. lsshfs
blacknon Apr 12, 2026
2ca596e
update. lsshfs
blacknon Apr 12, 2026
0a0159a
update. lsshfs
blacknon Apr 12, 2026
6815c91
update. lsshfs debug now
blacknon Apr 12, 2026
7005242
update. lsshfs debug now
blacknon Apr 12, 2026
60de548
update. lsshfs debug now
blacknon Apr 12, 2026
0ac4680
update. lsshfs debug now
blacknon Apr 12, 2026
00be9e6
update. lsshfs debug now
blacknon Apr 12, 2026
6ce6808
update. lsshfs debug now
blacknon Apr 12, 2026
61231ca
update. lsshfs debug now
blacknon Apr 12, 2026
e7f9d9b
update. lsshfs debug now
blacknon Apr 12, 2026
e8f9a67
update. lsshfs debug now
blacknon Apr 12, 2026
ed9381f
update. fuse
blacknon Apr 12, 2026
32ae274
update. fuse
blacknon Apr 12, 2026
48ae4f3
update. fuse
blacknon Apr 12, 2026
278b878
update. fuse
blacknon Apr 12, 2026
b64ac4a
update. fuse
blacknon Apr 12, 2026
e86e1a4
update. fuse
blacknon Apr 12, 2026
2ada87a
update. fuse debug
blacknon Apr 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/demo-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
- name: Run demo e2e test
env:
LSSH_RUN_DEMO_E2E: "1"
run: go test -v ./demo -run TestDemoDockerComposeE2E
run: sudo modprobe fuse && go test -v ./demo -run TestDemoDockerComposeE2E
35 changes: 29 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ jobs:
ext=".exe"
fi
for cmd in lssh lscp lsftp lsmon lsshell; do
cmds="lssh lscp lsftp lssync lsdiff lsmon lsshell lsmux lspipe"
if [ "${GOOS}" != "windows" ]; then
cmds="${cmds} lsshfs"
fi
for cmd in ${cmds}; do
go build -o "dist/bin/${cmd}${ext}" "./cmd/${cmd}"
done
Expand Down Expand Up @@ -105,19 +110,37 @@ jobs:
case "$1" in
full) echo "Full lssh suite with SSH, transfer, monitoring, and parallel shell tools." ;;
core) echo "Core SSH client package for the lssh suite." ;;
transfer) echo "Transfer tools package for the lssh suite, including lscp and lsftp." ;;
transfer)
if [ "$GOOS" = "windows" ]; then
echo "Transfer and diff tools package for the lssh suite, including lscp, lsftp, lssync, and lsdiff."
else
echo "Transfer, diff, and mount tools package for the lssh suite, including lscp, lsftp, lssync, lsdiff, and lsshfs."
fi
;;
monitor) echo "Monitoring tools package for the lssh suite, including lsmon." ;;
sysadmin) echo "Sysadmin tools package for the lssh suite, including lsshell." ;;
sysadmin) echo "Sysadmin tools package for the lssh suite, including lsshell, lsmux, and lspipe." ;;
esac
}
package_binaries() {
case "$1" in
full) echo "lssh lscp lsftp lsmon lsshell" ;;
full)
if [ "$GOOS" = "windows" ]; then
echo "lssh lscp lsftp lssync lsdiff lsmon lsshell lsmux lspipe"
else
echo "lssh lscp lsftp lssync lsdiff lsshfs lsmon lsshell lsmux lspipe"
fi
;;
core) echo "lssh" ;;
transfer) echo "lscp lsftp" ;;
transfer)
if [ "$GOOS" = "windows" ]; then
echo "lscp lsftp lssync lsdiff"
else
echo "lscp lsftp lssync lsdiff lsshfs"
fi
;;
monitor) echo "lsmon" ;;
sysadmin) echo "lsshell" ;;
sysadmin) echo "lsshell lsmux lspipe" ;;
esac
}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@
/lsmon
/lsmux
/lsshell
/lsshfs
/lssync
/lsdiff
/lspipe
*.exe
92 changes: 92 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,34 @@ GOTEST=$(MODULE) $(GOCMD) test -cover
GOGET=$(GOCMD) get
GOMOD=$(MODULE) $(GOCMD) mod
GOINSTALL=$(MODULE) $(GOCMD) install
COMPLETION_SHELL?=all
COMPLETION_PREFIX?=

# OS別にbuildのコマンド生成
UNAME_S=$(shell uname -s)
BUILDCMD_LSSH=$(GOBUILD) ./cmd/lssh
BUILDCMD_LSCP=$(GOBUILD) ./cmd/lscp
BUILDCMD_LSFTP=$(GOBUILD) ./cmd/lsftp
BUILDCMD_LSSYNC=$(GOBUILD) ./cmd/lssync
BUILDCMD_LSDIFF=$(GOBUILD) ./cmd/lsdiff
BUILDCMD_LSSHFS=$(GOBUILD) ./cmd/lsshfs
BUILDCMD_LSMON=$(GOBUILD) ./cmd/lsmon
BUILDCMD_LSSHELL=$(GOBUILD) ./cmd/lsshell
BUILDCMD_LSMUX=$(GOBUILD) ./cmd/lsmux
BUILDCMD_LSPIPE=$(GOBUILD) ./cmd/lspipe

# install path
INSTALL_PATH_LSSH=/usr/local/bin/lssh
INSTALL_PATH_LSCP=/usr/local/bin/lscp
INSTALL_PATH_LSFTP=/usr/local/bin/lsftp
INSTALL_PATH_LSSYNC=/usr/local/bin/lssync
INSTALL_PATH_LSDIFF=/usr/local/bin/lsdiff
INSTALL_PATH_LSSHFS=/usr/local/bin/lsshfs
INSTALL_PATH_LSSHELL=/usr/local/bin/lsshell
INSTALL_PATH_LSMON=/usr/local/bin/lsmon
INSTALL_PATH_LSMUX=/usr/local/bin/lsmux
INSTALL_PATH_LSPIPE=/usr/local/bin/lspipe

build:
# Remove unnecessary dependent libraries
$(GOMOD) tidy
Expand All @@ -38,39 +49,120 @@ build:
$(BUILDCMD_LSFTP)
# Build lssync
$(BUILDCMD_LSSYNC)
# Build lsdiff
$(BUILDCMD_LSDIFF)
# Build lsshfs
$(BUILDCMD_LSSHFS)
# Build lsmon
$(BUILDCMD_LSMON)
# Build lsshell
$(BUILDCMD_LSSHELL)
# Build lsmux
$(BUILDCMD_LSMUX)
# Build lspipe
$(BUILDCMD_LSPIPE)

clean:
$(GOCLEAN) ./...
rm -f lssh
rm -f lscp
rm -f lsftp
rm -f lssync
rm -f lsdiff
rm -f lsshfs
rm -f lsmon
rm -f lsshell
rm -f lsmux
rm -f lspipe

install:
# rm old binary
[ -e $(INSTALL_PATH_LSSH) ] && rm $(INSTALL_PATH_LSSH) || true
[ -e $(INSTALL_PATH_LSCP) ] && rm $(INSTALL_PATH_LSCP) || true
[ -e $(INSTALL_PATH_LSFTP) ] && rm $(INSTALL_PATH_LSFTP) || true
[ -e $(INSTALL_PATH_LSSYNC) ] && rm $(INSTALL_PATH_LSSYNC) || true
[ -e $(INSTALL_PATH_LSDIFF) ] && rm $(INSTALL_PATH_LSDIFF) || true
[ -e $(INSTALL_PATH_LSSHFS) ] && rm $(INSTALL_PATH_LSSHFS) || true
[ -e $(INSTALL_PATH_LSSHELL) ] && rm $(INSTALL_PATH_LSSHELL) || true
[ -e $(INSTALL_PATH_LSMON) ] && rm $(INSTALL_PATH_LSMON) || true
[ -e $(INSTALL_PATH_LSMUX) ] && rm $(INSTALL_PATH_LSMUX) || true
[ -e $(INSTALL_PATH_LSPIPE) ] && rm $(INSTALL_PATH_LSPIPE) || true

# copy binary to /usr/local/bin/
cp lssh $(INSTALL_PATH_LSSH)
cp lscp $(INSTALL_PATH_LSCP)
cp lsftp $(INSTALL_PATH_LSFTP)
cp lssync $(INSTALL_PATH_LSSYNC)
cp lsdiff $(INSTALL_PATH_LSDIFF)
cp lsshfs $(INSTALL_PATH_LSSHFS)
cp lsshell $(INSTALL_PATH_LSSHELL)
cp lsmon $(INSTALL_PATH_LSMON)
cp lsmux $(INSTALL_PATH_LSMUX)
cp lspipe $(INSTALL_PATH_LSPIPE)

# copy template config file
cp -n example/config.tml ~/.lssh.conf || true

install-completions:
@set -eu; \
shell_name="$(COMPLETION_SHELL)"; \
prefix="$(if $(COMPLETION_PREFIX),$(COMPLETION_PREFIX),/usr/local)"; \
install_shell() { \
src_dir="$$1"; \
dst_dir="$$2"; \
mkdir -p "$$dst_dir"; \
for src in "$$src_dir"/*; do \
[ -f "$$src" ] || continue; \
cp "$$src" "$$dst_dir/"; \
printf 'installed %s -> %s\n' "$$src" "$$dst_dir/"; \
done; \
}; \
case "$$shell_name" in \
bash) install_shell completion/bash "$$prefix/share/bash-completion/completions" ;; \
zsh) install_shell completion/zsh "$$prefix/share/zsh/site-functions" ;; \
fish) install_shell completion/fish "$$prefix/share/fish/vendor_completions.d" ;; \
all) \
install_shell completion/bash "$$prefix/share/bash-completion/completions"; \
install_shell completion/zsh "$$prefix/share/zsh/site-functions"; \
install_shell completion/fish "$$prefix/share/fish/vendor_completions.d"; \
;; \
*) echo "unknown COMPLETION_SHELL: $$shell_name" >&2; exit 1 ;; \
esac

install-completions-user:
@set -eu; \
shell_name="$(COMPLETION_SHELL)"; \
prefix="$(if $(COMPLETION_PREFIX),$(COMPLETION_PREFIX),$$HOME)"; \
install_shell() { \
src_dir="$$1"; \
dst_dir="$$2"; \
mkdir -p "$$dst_dir"; \
for src in "$$src_dir"/*; do \
[ -f "$$src" ] || continue; \
cp "$$src" "$$dst_dir/"; \
printf 'installed %s -> %s\n' "$$src" "$$dst_dir/"; \
done; \
}; \
zsh_note=0; \
case "$$shell_name" in \
bash) install_shell completion/bash "$$prefix/.local/share/bash-completion/completions" ;; \
zsh) install_shell completion/zsh "$$prefix/.zfunc"; zsh_note=1 ;; \
fish) install_shell completion/fish "$$prefix/.config/fish/completions" ;; \
all) \
install_shell completion/bash "$$prefix/.local/share/bash-completion/completions"; \
install_shell completion/zsh "$$prefix/.zfunc"; \
install_shell completion/fish "$$prefix/.config/fish/completions"; \
zsh_note=1; \
;; \
*) echo "unknown COMPLETION_SHELL: $$shell_name" >&2; exit 1 ;; \
esac; \
if [ "$$zsh_note" -eq 1 ]; then \
printf '%s\n' \
'zsh note:' \
' Add this to ~/.zshrc if ~/.zfunc is not already in fpath:' \
' fpath=($$HOME/.zfunc $$fpath)' \
' autoload -Uz compinit && compinit'; \
fi

test:
$(GOTEST) ./...
45 changes: 45 additions & 0 deletions Makefile_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package main

import (
"os"
"strings"
"testing"
)

func TestMakefileIncludesNewCommandsInBuildAndInstall(t *testing.T) {
data, err := os.ReadFile("Makefile")
if err != nil {
t.Fatalf("ReadFile(Makefile) error = %v", err)
}
text := string(data)

for _, needle := range []string{
"BUILDCMD_LSDIFF=$(GOBUILD) ./cmd/lsdiff",
"BUILDCMD_LSSHFS=$(GOBUILD) ./cmd/lsshfs",
"BUILDCMD_LSMUX=$(GOBUILD) ./cmd/lsmux",
"$(BUILDCMD_LSDIFF)",
"$(BUILDCMD_LSSHFS)",
"$(BUILDCMD_LSMUX)",
"cp lsdiff $(INSTALL_PATH_LSDIFF)",
"cp lsshfs $(INSTALL_PATH_LSSHFS)",
"cp lsmux $(INSTALL_PATH_LSMUX)",
"cp lspipe $(INSTALL_PATH_LSPIPE)",
} {
if !strings.Contains(text, needle) {
t.Fatalf("Makefile missing %q", needle)
}
}
}

func TestMakefileCompletionTargetsExist(t *testing.T) {
data, err := os.ReadFile("Makefile")
if err != nil {
t.Fatalf("ReadFile(Makefile) error = %v", err)
}
text := string(data)
for _, target := range []string{"install-completions:", "install-completions-user:"} {
if !strings.Contains(text, target) {
t.Fatalf("Makefile missing target %q", target)
}
}
}
Loading