Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55b9189713 | ||
|
|
b763c30cc5 | ||
|
|
61489ad00b | ||
|
|
1ff3910c70 | ||
|
|
1966a30deb | ||
|
|
50e3a6856e | ||
|
|
9885c4be7a | ||
|
|
29aa77aa27 | ||
|
|
6e9f53f4bb | ||
|
|
099cccdcb5 | ||
|
|
4220868cc7 |
No files matched your search
@@ -0,0 +1,25 @@
|
||||
name: Go
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.15
|
||||
|
||||
- name: Build
|
||||
run: go build -v ./...
|
||||
|
||||
- name: Test
|
||||
run: go test -v ./...
|
||||
@@ -0,0 +1,28 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.15
|
||||
|
||||
- name: Build
|
||||
run: gen/xbuild.sh
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: dist/*
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
language: go
|
||||
|
||||
go:
|
||||
- 1.15.x
|
||||
|
||||
before_deploy:
|
||||
- gen/xbuild.sh
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key:
|
||||
secure: RdZAOPWooYq73iFQIjqe9+Awr7oA8m0j0tn1tUUfLjP+PGYpuz2lf1SHW/UjPcxySFkkBxnNPC1xgqmxekmvZadBaQbApqko4e47zCF0Pe91QG9OcDFaiJUWb7wcg+UDLoS0lJq8mcKYoi6bV76syOk0gBunLUmuYYpz/hR4lbalfq5//fD6sOOJ9cJPjeuG7LwYqbyw/8VwQWpiWgK9Sb5gu7+ZBgXkLG+/5OSHW8yNHGmtkw5sjMr4jQnNt2ixXVe5OdQ14mvRx0n4vlnzjNjmY6cPjEeqAc9eniOJ5o99k1OnR3H5kmNgI749q+VAkdu/uJfHiLXL1zerReb4SSTU+tTw9c7JYTcjBHlCT11CHlksVu55hHAbFvPkIpLfoRvdqrcjUyEHiCI/HbWiHhsQ+Gve+tpIcgu/aAC2TEsQ+vmmaXbOFcUsG77XP8gn1y+Spkyzou7tUvypIXduDSKFIvI51HYK2F5t5ttG6zJw9lpmmuoUWvCvbGvdAW893O6ef+iZvBoZYRjdeWvIqh/no2gWi1CRa4ZPSZWkn9NoE/2koaCQkrx9RHmEeLIukZVAT6ZViwvhMAOrvXQdKTDwbQ3ovMdtDvGcvjGz9k5xwnWrIcF7MV7nf7sj/JlcX2tulevcSLsYeBvcuTUFzy90erMy70MS01wp0I/IgpY=
|
||||
skip_cleanup: true
|
||||
file_glob: true
|
||||
file: dist/*
|
||||
name: $TRAVIS_TAG
|
||||
on:
|
||||
tags: true
|
||||
repo: gokcehan/lf
|
||||
@@ -5,7 +5,6 @@
|
||||
| [#lf](https://webchat.freenode.net/?channels=lf) (on Freenode)
|
||||
| [#lf:matrix.org](https://matrix.to/#/#lf:matrix.org) (with IRC bridge)
|
||||
|
||||
[](https://travis-ci.org/gokcehan/lf)
|
||||
[](https://goreportcard.com/report/github.com/gokcehan/lf)
|
||||
[](https://pkg.go.dev/github.com/gokcehan/lf)
|
||||
|
||||
|
||||
@@ -137,6 +137,10 @@ func loadFiles() (list []string, cp bool, err error) {
|
||||
}
|
||||
|
||||
func saveFiles(list []string, cp bool) error {
|
||||
if err := os.MkdirAll(filepath.Dir(gFilesPath), os.ModePerm); err != nil {
|
||||
return fmt.Errorf("creating data directory: %s", err)
|
||||
}
|
||||
|
||||
files, err := os.Create(gFilesPath)
|
||||
if err != nil {
|
||||
return fmt.Errorf("opening file selections file: %s", err)
|
||||
|
||||
@@ -368,7 +368,7 @@ Read a shell command to execute and wait for a key press in the end.
|
||||
|
||||
shell-async (modal) (default '&')
|
||||
|
||||
Read a shell command to execute synchronously without standard I/O.
|
||||
Read a shell command to execute asynchronously without standard I/O.
|
||||
|
||||
find (modal) (default 'f')
|
||||
find-back (modal) (default 'F')
|
||||
|
||||
+1
-1
@@ -384,7 +384,7 @@ Read a shell command to execute and wait for a key press in the end.
|
||||
|
||||
shell-async (modal) (default '&')
|
||||
|
||||
Read a shell command to execute synchronously without standard I/O.
|
||||
Read a shell command to execute asynchronously without standard I/O.
|
||||
|
||||
find (modal) (default 'f')
|
||||
find-back (modal) (default 'F')
|
||||
|
||||
+4
-4
@@ -15,10 +15,10 @@
|
||||
|
||||
$tmp = [System.IO.Path]::GetTempFileName()
|
||||
lf -last-dir-path="$tmp" $args
|
||||
if (test-path -pathtype leaf "$tmp") {
|
||||
$dir = type "$tmp"
|
||||
remove-item -force "$tmp"
|
||||
if (test-path -pathtype container "$dir") {
|
||||
if (Test-Path -PathType Leaf "$tmp") {
|
||||
$dir = Get-Content "$tmp"
|
||||
Remove-Item -Force "$tmp"
|
||||
if (Test-Path -PathType Container "$dir") {
|
||||
if ("$dir" -ne "$pwd") {
|
||||
cd "$dir"
|
||||
}
|
||||
|
||||
@@ -455,7 +455,7 @@ Read a shell command to execute and wait for a key press in the end.
|
||||
shell-async (modal) (default '&')
|
||||
.EE
|
||||
.PP
|
||||
Read a shell command to execute synchronously without standard I/O.
|
||||
Read a shell command to execute asynchronously without standard I/O.
|
||||
.PP
|
||||
.EX
|
||||
find (modal) (default 'f')
|
||||
|
||||
@@ -103,8 +103,10 @@ Loop:
|
||||
fmt.Fprintln(c, rest)
|
||||
}
|
||||
} else {
|
||||
if c, ok := gConnList[id]; ok {
|
||||
fmt.Fprintln(c, rest2)
|
||||
if c2, ok := gConnList[id]; ok {
|
||||
fmt.Fprintln(c2, rest2)
|
||||
} else {
|
||||
echoerr(c, "listen: send: no such client id is connected")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -836,22 +836,24 @@ func (ui *ui) draw(nav *nav) {
|
||||
ui.drawStatLine(nav)
|
||||
ui.screen.HideCursor()
|
||||
case ">":
|
||||
pos := min(runeSliceWidth(ui.cmdAccLeft), ui.msgWin.w-len(ui.cmdPrefix)-1)
|
||||
prefix := ui.cmdPrefix[:min(ui.msgWin.w-1, len(ui.cmdPrefix))]
|
||||
pos := min(runeSliceWidth(ui.cmdAccLeft), ui.msgWin.w-len(prefix)-1)
|
||||
left := ui.cmdAccLeft[runeSliceWidth(ui.cmdAccLeft)-pos:]
|
||||
right := ui.cmdAccRight
|
||||
ui.msgWin.printLine(ui.screen, 0, 0, st, ui.cmdPrefix)
|
||||
ui.msgWin.print(ui.screen, len(ui.cmdPrefix), 0, st, ui.msg)
|
||||
ui.msgWin.print(ui.screen, len(ui.cmdPrefix)+printLength(ui.msg), 0, st, string(left))
|
||||
ui.msgWin.print(ui.screen, len(ui.cmdPrefix)+printLength(ui.msg)+runeSliceWidth(left), 0, st, string(right))
|
||||
ui.screen.ShowCursor(ui.msgWin.x+len(ui.cmdPrefix)+printLength(ui.msg)+runeSliceWidth(left), ui.msgWin.y)
|
||||
ui.msgWin.printLine(ui.screen, 0, 0, st, prefix)
|
||||
ui.msgWin.print(ui.screen, len(prefix), 0, st, ui.msg)
|
||||
ui.msgWin.print(ui.screen, len(prefix)+printLength(ui.msg), 0, st, string(left))
|
||||
ui.msgWin.print(ui.screen, len(prefix)+printLength(ui.msg)+runeSliceWidth(left), 0, st, string(right))
|
||||
ui.screen.ShowCursor(ui.msgWin.x+len(prefix)+printLength(ui.msg)+runeSliceWidth(left), ui.msgWin.y)
|
||||
default:
|
||||
pos := min(runeSliceWidth(ui.cmdAccLeft), ui.msgWin.w-len(ui.cmdPrefix)-1)
|
||||
prefix := ui.cmdPrefix[:min(ui.msgWin.w-1, len(ui.cmdPrefix))]
|
||||
pos := min(runeSliceWidth(ui.cmdAccLeft), ui.msgWin.w-len(prefix)-1)
|
||||
left := ui.cmdAccLeft[runeSliceWidth(ui.cmdAccLeft)-pos:]
|
||||
right := ui.cmdAccRight
|
||||
ui.msgWin.printLine(ui.screen, 0, 0, st, ui.cmdPrefix)
|
||||
ui.msgWin.print(ui.screen, len(ui.cmdPrefix), 0, st, string(left))
|
||||
ui.msgWin.print(ui.screen, len(ui.cmdPrefix)+runeSliceWidth(left), 0, st, string(right))
|
||||
ui.screen.ShowCursor(ui.msgWin.x+len(ui.cmdPrefix)+runeSliceWidth(left), ui.msgWin.y)
|
||||
ui.msgWin.printLine(ui.screen, 0, 0, st, prefix)
|
||||
ui.msgWin.print(ui.screen, len(prefix), 0, st, string(left))
|
||||
ui.msgWin.print(ui.screen, len(prefix)+runeSliceWidth(left), 0, st, string(right))
|
||||
ui.screen.ShowCursor(ui.msgWin.x+len(prefix)+runeSliceWidth(left), ui.msgWin.y)
|
||||
}
|
||||
|
||||
if gOpts.preview {
|
||||
|
||||
Reference in new issue
Block a user