curusarn / resh Goto Github PK
View Code? Open in Web Editor NEWRESH ❯❯ Contextual shell history for zsh and bash
License: MIT License
RESH ❯❯ Contextual shell history for zsh and bash
License: MIT License
A: You have to add [ -f ~/.bashrc ] && . ~/.bashrc
to your ~/.bash_profile
.
Long Answer: Under macOS bash shell only loads ~/.bash_profile
because every shell runs as login shell. I will definitely work around this in the future but since this doesn't affect many people I decided to not solve this issue at the moment.
exitcode is 130
histfile
histfile
appends commands as they are written to history filehistsess
initializes itself using commands from histfile
In the end sesshist
contains a sequence of persisted commands, recent commands, and session commands.
I just hacked it together so I never really checked if it really works as it's supposed to.
Also deduplication doesn't work across the 3 sections mentioned above.
This issue serves as a collection of other tools that provide advanced search capabilities and do so in ways that can be used as an inspiration for resh cli.
Resulting design deciosions: #66
write about new features, about sanitization, about reshctl
My idea is to replace sensitive info with placeholders.
It's important to make sure that the same piece of information is always replaced with the same placeholder.
Replace sensitive info with hashes.
go version 2>/dev/null || echo please install go
if go version >= 1.11: build & install
else:
please install go-dep; then do dep init, build & install
bind -x
causes bash-preexec to run when it's not supposed to.
I added some nasty hack to work around it but I would like to solve it properly.
That said I'm really not sure if it's even possible. Bash is being super difficult to work with.
temporary solution: use nohup instead
future solution: compile and bundle setsid with resh
There should be no empty commands but when they somehow appear they break recall
Use exit status as an indication of error
It looks like there is a small issue in the final step of the installation on MacOS.
curl -fsSL https://raw.githubusercontent.com/curusarn/resh/master/scripts/rawinstall.sh | bash
Please report any issues you encounter to: https://github.com/curusarn/resh/issues
Looking for the latest release ...
* Latest version: 2.4.10 (git tag: v2.4.10)
Downloading files ...
* resh_2.4.10_checksums.txt
######################################################################### 100.0%
* resh_2.4.10_darwin_amd64.tar.gz
######################################################################### 100.0%
Checking integrity ...
* OK
Extracting downloaded files ...
* OK
Checking your system ...
* Login shell: zsh - OK
* Bash version: 3.2.57(1)-release - OK
* Zsh version: 5.7.1 - OK
* Nohup installed: OK
Creating directories ...
Copying files ...
Generating completions ...
Copying more files ...
Finishing up ...
/Users/vit.listik/.resh/util.sh: line 64: syntax error in conditional expression: unexpected token `('
INSTALLATION FAILED!
I'm sorry for the inconvenience.
Please create an issue: https://github.com/curusarn/resh/issues
You can rerun the installation by executing: (this will skip downloading)
cd /tmp/resh-rawinstall-Kwh && scripts/install.sh
RESH INFO: New RESH shellrc script was loaded - if you encounter any issues please restart this terminal session.
Is there a way to init a session in some part of the app without it being watched by sesswatch?
This could lead to increased memory use over time.
JSON (un)marshaling takes too long
use another format - most likely binary one
/etc/os-release
on OS Xsw_vers
https://ss64.com/osx/sw_vers.html% sw_vers
ProductName: Mac OS X
ProductVersion: 10.12.6
BuildVersion: 16G1815
uname
to get Linux
or Darwin
kills & restarts daemon
Check for GNU date during installation
I'm thinking:
Problem is that http.ListenAndServe
doesn't support unix sockets.
See if you can fork this: https://github.com/knqyf263/pet
What are the oldest versions of our dependencies are being shipped with popular OS's?
OS | golang | bash | zsh |
---|---|---|---|
macOS (Mojave) | N/A | 3.2.57 | 5.3 |
macOS (Catalina) | N/A | 3.2.57 | 5.7.1 |
Ubuntu LTS 16.04 (Xenial) | 1.6.2 (1.10 via backports) | 4.3 | 5.1.1 |
Ubuntu LTS 18.04 (Bionic) | 1.10.1 | 4.4 | 5.4.2 |
Debian Stretch (oldstable) | 1.7.4 | 4.4 | 5.3.1 |
Debian Buster (stable) | 1.11.6 | 5.0 | 5.7.1 |
Oldest golang: 1.10 (Xenial)
Oldest bash: 3.2.57 (macOS)
Oldest zsh: 5.1.1 (Xenial)
If resh-collect
or resh-postcollect
hangs you are not going to have a good time.
We need to have a timeout for anything we run.
Hey. I wonder if your project is free software. What license is it distributed under?
Oh-my-zsh does it like this
This will lead to higher reliability because daemon is not running yet (no restart needed etc...)
Can we assume: "daemon is not running" => "first session of the day"
This could cause problems -> we should have a ~/.resh/last_update_check.touch
AND a checking interval (CheckForUpdatesEveryNDays) in settings.
Bash completions are a prerequisite
reset the histno block every time the prefix changes
I trigger a recall which fails and breaks the state of the terminal session until running a command and redrawing the prompt resets the state which fixes the temporary issue
Linux: /usr/share/bash-completion/bash_completion
macOS: ?
Investigate
Updates are currently done by running make install
in the cloned repository.
Use reshctl update
instead.
recall actions contain parts of commands - potentially whole commandlines
This might break some of the metadata or even the recording of the "command" to history
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.