Comments (10)
Weird! Thanks for testing out McFly. I'm still on 10.13.6. Do both terminal windows have the same value for $MCFLY_HISTORY
? Does running mktemp -t mcfly.XXXX
twice give you the same output? (It shouldn't.)
from mcfly.
Every time I open a window it creates a new mcfly.XXXX
, which matches the set $MCFLY_HISTORY
. If I run the mktemp
command above twice I get different paths.
Last login: Mon Dec 3 19:15:05 on ttys011
-bash: /var/folders/kb/bswbcrr56ld5cv7zzhyp57gr0000gn/T/mcfly.XXXX.SNQglCSU: cannot overwrite existing file
gwk ~ $ echo $MCFLY_HISTORY
/var/folders/kb/bswbcrr56ld5cv7zzhyp57gr0000gn/T/mcfly.XXXX.SNQglCSU
gwk ~ $
from mcfly.
That's very odd. If you edit mcfly.bash
and add after line 9:
chmod 644 $MCFLY_HISTORY
Does that help at all? I can't tell if mcfly.bash
is erring out on line 8 or if it's later.
from mcfly.
I added set -x
, and it looks like it's the tail command on line 15.
+++ [[ '' == \l\o\a\d\e\d ]]
+++ export __MCFLY_LOADED=loaded
+++ __MCFLY_LOADED=loaded
++++ cat /dev/urandom
++++ env LC_CTYPE=C tr -dc a-zA-Z0-9
++++ fold -w 24
++++ head -n 1
+++ export MCFLY_SESSION_ID=R6GaHe2Jn5JzbylIKmM1JEu3
+++ MCFLY_SESSION_ID=R6GaHe2Jn5JzbylIKmM1JEu3
++++ mktemp -t mcfly.XXXX
+++ export MCFLY_HISTORY=/var/folders/kb/bswbcrr56ld5cv7zzhyp57gr0000gn/T/mcfly.XXXX.JsVKq6ZD
+++ MCFLY_HISTORY=/var/folders/kb/bswbcrr56ld5cv7zzhyp57gr0000gn/T/mcfly.XXXX.JsVKq6ZD
+++ export HISTFILE=/Users/gwk/.bash_history
+++ HISTFILE=/Users/gwk/.bash_history
+++ [[ -f /Users/gwk/.bash_history ]]
+++ tail -n100 /Users/gwk/.bash_history
-bash: /var/folders/kb/bswbcrr56ld5cv7zzhyp57gr0000gn/T/mcfly.XXXX.JsVKq6ZD: cannot overwrite existing file
+++ export HISTCONTROL=ignorespace
+++ HISTCONTROL=ignorespace
+++ shopt -s histappend
+++ PROMPT_COMMAND='__last_exit=$?;history -a $MCFLY_HISTORY;mcfly add --exit $__last_exit --append-to-histfile;history -cr $MCFLY_HISTORY;gloss_set_prompts'
+++ [[ himxBCH =~ .*i.* ]]
+++ bind ''\''\C-r'\'': '\''\C-amcfly: \e# mcfly search\C-j'\'''
+++ set +x
from mcfly.
That's helpful! Does adding chmod 644 $MCFLY_HISTORY
after line 9 help?
from mcfly.
I know what is wrong: I have bash configured to deny blind overwrites with >
. I changed it to use >|
instead and it works. I forget what this option is called, but I can look it up.
from mcfly.
Oh interesting, I didn't know about noclobber
! Mind sending a PR with the change? (Or I can add it, but I want you to get credit! 😄 )
from mcfly.
It's set -o noclobber
. Seems worth supporting since you are sourcing into the user's interactive shell.
from mcfly.
Yes, I'll make a PR now.
from mcfly.
I believe that this has been fixed.
from mcfly.
Related Issues (20)
- mcfly stopped working (kernel issue) HOT 17
- feature request - CLI option to dump the sqlite3 db HOT 7
- Integrate with Atuin HOT 5
- thread 'main' panicked : database disk image is malformed HOT 3
- thread 'main' panicked at 'McFly error occurs each time I run some command. HOT 2
- Can't search command with '-' arguments in PowerShell
- have sane default colors HOT 2
- mcfly prints arguments when moving files around HOT 2
- Draft releases messed up HOT 4
- zsh-vi-mode conflict
- Allow <TAB> to cycle through options instead of select HOT 3
- Allow ENTER to select the command and put it on commandline
- Handle multiple commands separated by "\n" in Fish shell HOT 2
- F3 key does not work with 'vim' key scheme HOT 1
- Powershell support documentation HOT 1
- F3 breaks standard terminal's line limit HOT 3
- Request for Dynamic Fuzz Search Toggle Within Search Interface HOT 1
- Vulnerabilities mio and zerocopy dependency HOT 1
- Panic in `src/fake_typer.rs` - broken edit and run commands HOT 8
- Bug in mcfly.fish HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mcfly.