Giter VIP home page Giter VIP logo

fishmarks's People

Contributors

fedorpashin avatar immortalin avatar techwizrd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fishmarks's Issues

Deleting bookmarks with invalid names is impossible

Although it is possible to add bookmarks with invalid names as per Issue #10, there is no way to delete them. This leaves the user with no way to fix their situation other than manually editing the ~/.sdirs file.

Operating System: Ubuntu 13.04 "Raring Ringtail"
Fish Shell: fish, version 2.0.0 (Compiled from Git version fish-shell/fish-shell@a62ebc9)
Fishmarks version: 5f4771d
Steps to Reproduce:
The terminal session below demonstrates how to reproduce the error.

[~]$ mkdir test
[~]$ cd test
[~/test]$ s test~dir
set: Invalid character “~” in variable name. Only alphanumerical characters and underscores are valid in a variable name.
/home/kunal/.fishmarks/marks.fish (line 157): set -x DIR_test~dir "$HOME/test"
                                                      ^
in . (source) call of file “-”,
        called on line 140 of file “/home/kunal/.fishmarks/marks.fish”,

in function “_update_completions”,
        called on line 50 of file “/home/kunal/.fishmarks/marks.fish”,

in function “save_bookmark”,
        called on line 1 of file “-”,
        with parameter list “test~dir”

in function “s”,
        called on standard input,
        with parameter list “test~dir”
[~/test]$ d test~dir
set: Invalid character “~” in variable name. Only alphanumerical characters and underscores are valid in a variable name.
/home/kunal/Projects/fishmarks/marks.fish (line 143): set -x DIR_test~dir "$HOME/test"
                                                      ^
in . (source) call of file “-”,
        called on line 129 of file “/home/kunal/.fishmarks/marks.fish”,

in function “_valid_bookmark”,
        called on line 92 of file “/home/kunal/.fishmarks/marks.fish”,
        with parameter list “test~dir”

in function “delete_bookmark”,
        called on line 1 of file “-”,
        with parameter list “test~dir”

in function “d”,
        called on standard input,
        with parameter list “test~dir”

ERROR: bookmark 'test~dir' does not exist

When a file has moved/removing or overwriting

When you relocate a folder, the location obviously can't be found. I am however also having trouble removing the bookmark, and I even attempted to overwrite it with no luck. In both cases I get an error message that looks like this: "sed: 1: "/Users/Schuyler/.sdirs": invalid command code S"

Join Wahoo?

We are still relatively new in town, and just getting started, but we are more stable than the other options, namely OMF. I think some of these functions could be turned into a handful of Wahoo plugins or maybe some could be even make it to core. We are always accepting feature request and feedback. I would love if you could give Wahoo a look.

Regards 😄

Change the source to a proper distribution

While the current install mechanism as mentioned in the README is good for a quick and dirty install, creating a distribution package will generally require the scripts to be installed in system directories.
Fish does provide mechanisms for this!

I'd recommend the following source structure:

  • <function_name>.fish for each included function. This can be installed to pkg-config --variable functionsdir fish which points to /usr/share/fish/vendor_functions.d
  • fishmarks.fish containing the aliases and the SDIR check. This can be installed to pkg-config --variable confdir fish (/usr/share/fish/vendor_conf.d)

This would clean up the installs and probably simplify the packaging process.
I am willing to provide a PR, if desired.

Add flag to toggle Bashmarks interoperability

There isn't necessarily a need to restrict Fishmarks to only bashmarks functionality, bookmark names, error messages, and help text. There should be a flag like BASHMARK_COMPATIBLE to make Fishmarks act exactly like Bashmarks. Unseting the flag should allow Fishmarks to provide less restrictions on bookmark names and more helpful error messages and help text.

For example, UNIX directories can have hyphens in their name, but currently hyphens are not allowed in bookmark names. Hyphens are not allowed because they cannot be used in bash environment variables and bashmarks saves all of it's directories as environment variables prefixed with DIR_ in the ~/.sdirs file. This is only one of the many restrictions that could be lifted if Fishmarks did not have to keep strict compatibility with Bashmarks.

Saving bookmarks with invalid characters in the name causes errors every subsequent use

Fishmarks allows you to save bookmarks with names that contain invalid characters that cause Fishmarks to display an error on every you try to use Fishmarks afterwards. However, you cannot remove them unless you edit the ~/.sdirs file because the Fish shell cannot set variables with invalid variables.

Operating System: Ubuntu 13.04 "Raring Ringtail"
Fish Shell: fish, version 2.0.0 (Compiled from Git version fish-shell/fish-shell@a62ebc9)
Fishmarks version: 5f4771d
Steps to Reproduce:
The terminal session below demonstrates how to reproduce the error.

[~]$ mkdir test
[~]$ cd test
[~/test]$ s test~dir
set: Invalid character “~” in variable name. Only alphanumerical characters and underscores are valid in a variable name.
/home/kunal/.fishmarks/marks.fish (line 157): set -x DIR_test~dir "$HOME/test"
                                                      ^
in . (source) call of file “-”,
        called on line 140 of file “/home/kunal/.fishmarks/marks.fish”,

in function “_update_completions”,
        called on line 50 of file “/home/kunal/.fishmarks/marks.fish”,

in function “save_bookmark”,
        called on line 1 of file “-”,
        with parameter list “test~dir”

in function “s”,
        called on standard input,
        with parameter list “test~dir”
[~/test]$ l
set: Invalid character “~” in variable name. Only alphanumerical characters and underscores are valid in a variable name.
/home/kunal/.fishmarks/marks.fish (line 119): set -x DIR_test~dir "$HOME/test"
                                                      ^
in . (source) call of file “-”,
        called on line 103 of file “/home/kunal/.fishmarks/marks.fish”,

in function “list_bookmarks”,
        called on line 1 of file “-”,

in function “l”,
        called on standard input,

Add comprehensive unit tests for every function

Currently, developing Fishmarks is tricky because there are no unit tests to ensure that Fishmarks is working properly as new features are added or issues are fixed. Since Fishmarks works with text and has to make sure text is in a very specific format to be parsed, unit tests are a necessary to make sure that things like bookmark names are parsed that same way in every function and changes to the parsing system do not impact Fishmarks robust handling of bookmark names or user input.

However, there does not seem to be a clear standard for testing in Fish unlike JUnit for Java, unittest for Python, and RSpec for Ruby. The two solutions I can think of are running and writing Fishmarks tests using using the testing functionality of purpose programming language like Python or writing a test harness framework and unit testing library for Fish.

Remove automatic way of installing

As noted, this way is terrible for security. Let's not even list it as an option. The manual way is not difficult. Or find a more secure way of doing it "automatically".

Strange bug when using fishmarks

Hi, I am not sure whether this is a bug or a feature. I use GNU stow and git to manage my dotfiles on multiple ubuntu machines so fishmarks' .sdirs file is always symlinked from my dotfiles git repo to the home directory. However, the .sdirs symlink is sometimes no longer effective and fishmarks starts reading from a non-symlinked .sdirs= file it created, causing me to always have to copy the new file into my dotfiles git repo, rename it, and symlink it again. This behaviour is highly annoying but I have no idea what are the conditions that cause it as it seems to appear randomly whenever I add a new bookmark.

lot of errors

using fish 2.1.1 from ppa

set: Invalid character '-' in variable name. Only alphanumerical characters and underscores are valid in a variable name.
/home/teddy/.dotfiles/pkg/marks/marks.fish (line 103): set -x DIR_-h "$HOME/.dotfiles/pkg/marks"
                                                       ^
in . (source) call of file '-',
    called on line 109 of file '/home/teddy/.dotfiles/pkg/marks/marks.fish',

in function 'list_bookmarks',
    called on line 1 of file '-',

in function 'l',
    called on standard input,


       set - set - display and change environment variables.


set - display and change environment variables.
   Synopsis
       set [SCOPE_OPTIONS]
       set [OPTIONS] VARIABLE_NAME VALUES...
       set [OPTIONS] VARIABLE_NAME[INDICES]... VALUES...
       set (-q | --query) [SCOPE_OPTIONS] VARIABLE_NAMES...
       set (-e | --erase) [SCOPE_OPTIONS] VARIABLE_NAME
       set (-e | --erase) [SCOPE_OPTIONS] VARIABLE_NAME[INDICES]...

set: Type 'help set' for related documentation

set: Invalid character '-' in variable name. Only alphanumerical characters and underscores are valid in a variable name.
/home/teddy/.dotfiles/pkg/marks/marks.fish (line 105): set -x DIR_-h "$HOME/.dotfiles/pkg"
                                                       ^
in . (source) call of file '-',
    called on line 109 of file '/home/teddy/.dotfiles/pkg/marks/marks.fish',

in function 'list_bookmarks',
    called on line 1 of file '-',

in function 'l',
    called on standard input,


       set - set - display and change environment variables.


set - display and change environment variables.
   Synopsis
       set [SCOPE_OPTIONS]
       set [OPTIONS] VARIABLE_NAME VALUES...
       set [OPTIONS] VARIABLE_NAME[INDICES]... VALUES...
       set (-q | --query) [SCOPE_OPTIONS] VARIABLE_NAMES...
       set (-e | --erase) [SCOPE_OPTIONS] VARIABLE_NAME
       set (-e | --erase) [SCOPE_OPTIONS] VARIABLE_NAME[INDICES]...

set: Type 'help set' for related documentation

ckan                 /home/user/Kod/ckan
godot                /home/user/Programy/godot
pkg                  /home/user/.dotfiles/pkg

`sed` errors out when deleting a bookmark on MacOS

I've been using fishmarks for a long time. Recently, I noticed that deleting a bookmark errors out due to sed. Here's how this looks like:

ankur@MauiCovenant ~/L/A/S/P/User> s st3user
ankur@MauiCovenant ~/L/A/S/P/User> l
st3user              /Users/ankur/Library/Application Support/Sublime Text/Packages/User
ankur@MauiCovenant ~/L/A/S/P/User> d st3user
sed: illegal option -- -
usage: sed script [-Ealnru] [-i extension] [file ...]
	sed [-Ealnu] [-i extension] [-e script] ... [-f script_file] ... [file ...]

I notice that the error is due to this line in fishmarks/marks.fish's delete_bookmark function:

sed --follow-symlinks -i='' "/DIR_$argv[1]=/d" $SDIRS

The error exists if I reorder the --follow-symlinks option:

sed -i='' --follow-symlinks "/DIR_$argv[1]=/d" $SDIRS

But, error disappears when I change the above line to

sed -i --follow-symlinks "/DIR_$argv[1]=/d" $SDIRS

I see that -i='' was added in #1. I don't know if -i='' is still needed. I did a test on MacOS and it seems that a fishmark associated with a relocated folder can still be deleted with only -i --follow-symlinks without needing =''. Let me know what you think. Thanks!

Package Fishmarks for Red Hat systems

It would be good to package Fishmarks for Red Hat-based systems like Red Hat and CentOS. It would also be useful to provide packages for Fedora as well.

Create an Ubuntu PPA

It would be much easier to install fishmarks on Ubuntu-based systems if there was a PPA on Launchpad with Debian packages for fishmarks that are in sync with the Git repository. It would be even better if the repository included stable releases, nightly releases, packages tracking the Git repository for the fish shell.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.