Comments (13)
Hey Iperdomo,
Thanks for the heads up. I tried it and it works as long as the bookmark name does not contain a dot in it. The shell script works fine for folders with periods in them.
-H
from bashmarks.
I just added in a validation function that checks if bookmarkname is valid
from bashmarks.
Sorry, I meant to say that going to folders with dots in the path should work now.
from bashmarks.
hi huyng,
I just pulled the latest changes (rev faff75c) to test it. Now when you try to save a name with a dot in it, you get a message
/tmp/1.0 $ s 1.0
bookmark name is not valid
The weird thing is that now i cannot save using the s command. I can go, list but not save a new bookmark, somehow my shell session gets terminated.
from bashmarks.
Hey iperdomo,
Directories with a "." in their paths are valid, but bookmark_names cannot periods. Can you try removing your .sdirs file and let me know if you still can't save new bookmarks?
Thanks,
-H
from bashmarks.
Hi,
I was aware of the bookmark_name restriction. I purged the .sdirs file, and I'm able to save new bookmarks, but, after saving a bookmark (with a valid name) pointing to a folder with a dot, the save command doesn't work anymore.
Steps to reproduce:
$ rm ~/.sdirs
# start new shell (to purge the environment variables)
$ l # should not show any bookmark
$ cd /tmp
/tmp $ s tmp
/tmp $ l # should show the tmp bookmark
/tmp $ mkdir 1.0 && cd 1.0
/tmp/1.0 $ s t1 # fails, also tested with 1, a
Cheers,
from bashmarks.
Damn,
Okay we must have something differently configured on our machines. Could send me your ".sdirs" file if you don't mind after running the above sequence? Also, what OS are you running?
Thanks for your help again.
-Huy
from bashmarks.
Hi,
I just tested it again. After removing the .sdirs file I can add 1 bookmark. When I try the 2nd one, it fails. My current .sdirs file only contains one bookmark.
~ $ cat .sdirs
export DIR_pi="$HOME/workspace/src/openbravo/pi"
~ $ env | grep DIR_
DIR_pi=/home/iperdomo/workspace/src/openbravo/pi
I'm running Gentoo Linux:
~ $ uname -a
Linux por0748 2.6.36-gentoo-r5 SMP Tue Jan 4 12:47:56 CET 2011 i686 Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz GenuineIntel GNU/Linux
~ $ sh --version
GNU bash, version 4.1.9(2)-release (i686-pc-linux-gnu)
Thanks for your support :)
from bashmarks.
I can confirm the same problem (second bookmark fails) on Ubuntu and Debian.
The issue appears to be with the call to mktemp
in _purge_line
, introduced in commit e1a1181.
For GNU mktemp
the template argument pattern must have a number of X
s which it replaces with random characters. BSD mktemp
is happy with a simple prefix pattern.
Updating the call to something like mktemp -t bashmarks.XXXXXX
is enough for portability between both systems. On BSD, it will simply create a temp file with literal X
s in the name.
from bashmarks.
arbscht! thank you .. I was pulling my hair out trying to figure out what was going wrong with the command. I've updated the mktemp call and tested it on my ubuntu machine. I also found another portability bug in the way we were making the "awk" call in the the L command.
could you guys pull the latest version and try it out.
Thanks again for all the help.
Sincerely,
Huy
from bashmarks.
Hi,
I just pulled the latest changes, and now is working fine, hooray! :D
Thank for your support, also want to thank arbscht for his advice.
Cheers,
from bashmarks.
Also works for me. Thanks!
from bashmarks.
Sweet, thanks for the help.
from bashmarks.
Related Issues (20)
- Homebrew integration for Mac?
- Purge_line breaks .sdirs when it is a symlink HOT 2
- Install and share Bashmarks between multiple user? HOT 2
- UTF-8 support in bookmark names
- Autocomplete not working HOT 2
- Function names conflict with fasd. Suggestion to a new script design... Read details. HOT 2
- Wishlist: use system's default bookmarks file
- Not works for ubuntu HOT 1
- .sdirs symlinks
- "l" question HOT 4
- Feature request: Change directory using numbered list HOT 2
- Bashmarks Replacement HOT 2
- Feature request - shortcut for current directory HOT 2
- Website is dead HOT 1
- .description ?
- Add directions to README for Windows Users HOT 2
- Feature: Command to remove all bookmarks that link to undefined directories
- Feature: Improved CLI structure (single command w/ options) HOT 2
- bashmarks.sh do not save marks I make to the $SDIRS file HOT 1
- bashmarks does not work with "set -o noclobber" in bash
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 bashmarks.