Giter Club home page Giter Club logo

goto's People

Contributors

arxcis avatar sirkro avatar technocake avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

goto's Issues

Python 2.7 gives AttributeError missing buffer

If running on python 2.7, the difference on stdout implementation makes the sys.stdout missing the buffer attribute (due to not beeing a file object).

Consequently goto will crash.
This may be addressed with a try except AttributeError: .

Relevant files:
the_real_goto.py line 14

AttributeError: 'NoneType' object has no attribute 'startswith'

Bug found on develop branch
asciicast

bash-3.2$ goto list
article.as-we-may-think
code
downloads
file.goto
folder
gif
git.goto
github
github.goto
goto
home
issues
localgif
music.bruno-mars
newissue
pulls
repo
steam.downloads
steam.games
steamfriends
tesseract
toggl
universe
bash-3.2$ goto issue

Ah hoy!

    - The Magic word issue does not exist.

    Are you sure it exists in the project you are in now?
    Type:

        goto list

    to see all shortcuts in this project.
    
Traceback (most recent call last):
  File "/usr/local/bin/the_real_goto.py", line 11, in <module>
    load_entry_point('magicgoto', 'console_scripts', 'the_real_goto.py')()
  File "/Users/jonasjso/git/github/technocake/goto/goto/the_real_goto.py", line 33, in main
    output, err = run_command(magic, command, args)
  File "/Users/jonasjso/git/github/technocake/goto/goto/the_real_goto.py", line 82, in run_command
    return commands.default(magic, command)
  File "/Users/jonasjso/git/github/technocake/goto/goto/commands/default.py", line 16, in default
    if is_file(url):
  File "/Users/jonasjso/git/github/technocake/goto/goto/gotomagic/utils.py", line 21, in is_file
    candidate = os.path.abspath(raw_uri)
  File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 367, in abspath
    if not isabs(path):
  File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 54, in isabs
    return s.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'

&-argument is chopped off in url when not using quotes

Maybe impossible to avoid, but maybe we can warn users to use quotes. I don't know.

jonasjso in ~
$ goto oslo-by-car http://maps.apple.com/?daddr=Oslo&dirflg=d
[1] 3524

jonasjso in ~
$ goto show oslo-by-car
[1]+  Done                    goto oslo-by-car http://maps.apple.com/?daddr=Oslo
http://maps.apple.com/?daddr=Oslo

jonasjso in ~
$ goto show oslo-by-car
http://maps.apple.com/?daddr=Oslo

Silence browser output

We should research if there is a way to turn off the output from opening browser windows. It really clutters the terminal, and makes the experience of using goto less serene.

Example

jonas in ~ using goto
$ goto github 

jonas in ~ using goto
$ [16619:16718:0711/004235.107544:ERROR:rewards_service_impl.cc(191)] Failed to read file: /home/jonas/.config/BraveSoftware/Brave-Browser/Default/ledger_state
[16714:16714:0711/004235.118021:ERROR:ledger_impl.cc(361)] Failed to initialize wallet
goto list
github

NameError: global name 'GotoWarning' is not defined

jonasjso in ~/git/github/technocake/goto on develop
$ goto goto

Ah hoy!

    - The Magic word goto does not exist.

    Are you sure it exists in the project you are in now?
    Type:

        goto list

    to see all shortcuts in this project.
    
Traceback (most recent call last):
  File "/usr/local/bin/the_real_goto.py", line 11, in <module>
    load_entry_point('magicgoto', 'console_scripts', 'the_real_goto.py')()
  File "/Users/jonasjso/git/github/technocake/goto/goto/the_real_goto.py", line 33, in main
    output, err = run_command(magic, command, args)
  File "/Users/jonasjso/git/github/technocake/goto/goto/the_real_goto.py", line 79, in run_command
    return commands.default(magic, command)
  File "/Users/jonasjso/git/github/technocake/goto/goto/commands/default.py", line 14, in default
    return None, GotoWarning('magicword_does_not_exist', magicword=magicword)
NameError: global name 'GotoWarning' is not defined

Help text - swap order of commands and help text

Why do this?
It is a widely adopted convention that the first column is commands, and then the help text in the second column.

Current

The basics
    - Adding a shortcut:        goto add <magicword> <url or path>
    - Updating a shortcut:      goto update <magicword> <url or path>
    - Removing a shortcut:      goto rm <magicword>

    - Show url of shortcut:     goto show <magicword>

    - Listing all shortcuts:    goto list
    - With the urls printed:    goto list -v

Suggestion

The basics
    goto <magicword>                        Go to shortcut
    goto add    <magicword> <url or path>   Add shortcut      
    goto update <magicword> <url or path>   Update shortcut
    goto rm     <magicword>                 Remove shortcut
    goto show   <magicword>                 Show url of shortcut
    goto list                               List all shortcuts  
    goto list -v                            With the urls printed

Syncing goto files with git

Discussing with Niklas Trippler gave me the idea to use git as a way to syncronize goto files in a potential distributed way.

It should be an optional functionality, and it should require the user to have a git remote somewhere. Examples could be bitbucket, github, a private server, or even a shared network drive.

Then a configuration parameter could turn on git features of goto.

When activated, all goto actions could also include a git action.

goto add kittens http://mjau.no --> also does this to the ~/.goto/projects folder git commit -am "add kittens to project animal_farm"

And like wise:

project add animal_farm --> git commit -am "add project animal_farm"
project rm animal_farm --> git commit -am "rm project animal_farm"

goto update kittens --> git commit -am "update kittens in project animal_farm"
goto rm kittens --> git commit -am "rm kittens from project animal_farm"

goto server (ssh)

Seems that in os-x it is possible to do open ssh://server.example.com and a new terminal window opens that is sshing into it.

If there exists similar techniques for linux and windows we might spark a new plugin that can be registered to the ssh:// scheme.

Refactor goto

I'm currently working on refactoring the logic around storage to be centered around passing the project name only, and let the internal details be dealt with behind the hood. But inside python-land, and not in shell-land.

Rationale:

  • Support different scopes for shortcuts:

    • private
    • shared
    • public
  • cleaner setup

And of course in this process of implementing this I've been addressing some other issues. Like #41 unicode issues deleting entire project file.

This makes the GotoMagic do a bit more inside the project land.
Like creating folders and json files for each scope.

source start_goto in zsh breaks $PATH

After installing goto and adding source start_goto to .zshrc, when restarting zsh, several normal commands are not recognized and $PATH seems to be polluted.
screen shot 2018-10-05 at 20 36 31

Determine behaviour when old shortcuts points to deleted file

➜  ~ goto code
➜  ~ goto show code
/usr/local/opt/goto
➜  ~ ls /usr/local/opt/goto
ls: cannot access '/usr/local/opt/goto': No such file or directory

If a magicword is pointing to a file path that is no longer existing (post goto add) - the effect of goto is confusing. It doesnt do a thing - and returns exit code 0 (success).

We should probably create a Ah hoy warning message, telling the file is not existing..

install_goto with zsh prompts for wrong rcfile

install_goto should check for current shell and not if .bash_profile exists and so on.

Ex.
if current shell == Bash ?
else if current shell == Zsh?
else current shell is not supported

Detect and migrate all project data to new data structure

PR #107 introduced a new internal data structure for goto.

It introduces the concept of scope for the magicwords. Private or Shared.
It also adds a folder for each scope under the .goto/projects/projectname

This makes installing a new version of goto will not work with any of the old data.
The data should be migrated - this should be detected in the healthcheck of goto and the user should be prompted to migrate them.

also a backupgoto should be done before proceeding.

TODO

  • detect unmigrated data when running goto
  • create migration method
  • detect unmigrated data when running project

goto installation - without sudo git clone

Would be nice run git clone without sudo

jonas in ~
$ git clone https://github.com/technocake/goto /usr/local/opt/goto
fatal: could not create work tree dir '/usr/local/opt/goto': Permission denied

.bash_profile takes precendence of .profile - disabling all existing configuration in my terminal

Problem
I have my terminal config stored in ~/.profile on my mac. The goto installer creates a new file ~/.bash_profile with the following line, if it does not exist.

source start_goto

~/.bash_profile takes precendence over ~/.profile and therefore none of existing configuration is loaded.

Before installation:
before
After goto install - all custom styling disabled
after

Solution 1
Check if .profile or .bash_profile or .bashrc exists before appending. Could be a problem to know all different names to check for, across all different OS-es.

Solution 2
Source any other config from ~/.bash_profile if it does not exist. (what i ended up doing).

source ~/.profile
source start_goto

Advantage: you only have to check if ~/.bash_profile exists. Disadvantage: You are hijacking the default config file, and the users may or may not be upset about this. You still have the same problem from solution 1.

Solution 3
Don't try to put anything in these files. Is it really necessary to do this at all ? Isn't it enough to have stuff in available in PATH?

Installing goto on my Windows workstation - can't open file the_real_goto.py

  • On windows I just want to put the goto/bin folder in PATH using the Start Menu > Environment Variables GUI, since it is the least error prone way. I clone goto to my github folder, and then just add goto/bin to PATH as is, without moving it to some special place on the computer. Also without running the install script.

  • This leads to a problem with a wrongcoded path when I run goto the first time

$ cmd //c cd
P:\git\technocake\goto

$ goto list
(null): can't open file 'C:/Program Files/Git/usr/local/opt/goto/the_real_goto.py': [Errno 2] No such file or directory

make test - ERROR: InterpreterNotFound: python3.6

Because I have python3.7 installed

jonasjso in ~/git/github/technocake/goto on refactor/commands [!]
$ make unittest
tox
GLOB sdist-make: /Users/jonasjso/git/github/technocake/goto/setup.py
py27 inst-nodeps: /Users/jonasjso/git/github/technocake/goto/.tox/.tmp/package/1/magicgoto-1.4.4.zip
py27 installed: DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.,atomicwrites==1.3.0,attrs==19.1.0,configparser==3.7.4,contextlib2==0.5.5,funcsigs==1.0.2,importlib-metadata==0.18,magicgoto==1.4.4,more-itertools==5.0.0,packaging==19.0,pathlib2==2.3.4,pluggy==0.12.0,py==1.8.0,pyparsing==2.4.0,pyperclip==1.7.0,pytest==4.6.4,scandir==1.10.0,six==1.12.0,wcwidth==0.1.7,zipp==0.5.1
py27 run-test-pre: PYTHONHASHSEED='81451337'
py27 run-test: commands[0] | py.test
============================================================ test session starts ============================================================
platform darwin -- Python 2.7.16, pytest-4.6.4, py-1.8.0, pluggy-0.12.0
cachedir: .tox/py27/.pytest_cache
rootdir: /Users/jonasjso/git/github/technocake/goto
collected 1 item                                                                                                                            

goto/tests/test_gotomagic.py .                                                                                                        [100%]

========================================================= 1 passed in 0.03 seconds ==========================================================
py36 create: /Users/jonasjso/git/github/technocake/goto/.tox/py36
ERROR: InterpreterNotFound: python3.6
__________________________________________________________________ summary __________________________________________________________________
  py27: commands succeeded
ERROR:  py36: InterpreterNotFound: python3.6
make: *** [unittest] Error 1

jonasjso in ~/git/github/technocake/goto on refactor/commands [!]
$ python3
Python 3.7.3 (default, Jun 19 2019, 07:38:49) 
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 

renaming projects should be possible

the project command is currently lacking a update or rename command that really should be there. If a user wants to keep all its shortcut tied to a project, but for whatever reason wants to change the name - the user should be able to.

This action will require to simply change the name of the project-file, and handle some conditionally cases:

  • if the project is active, the active-project should also be updated
  • if the new name already exist, the renaming should give an error.

relevant files

source:

  • bin/project

state-files

  • ~/.goto/active-project
  • ~/.goto/state/projects/<project>/private/<project>.json
  • ~/.goto/state/projects/<project>/shared/<project>.json

automatically cd or open folder on goto <path-to-folder>

there should be a setting that determines gotos behavior on magic words that are a path to folder.
Some users might prefer to open the folder in Explorer | Finder etc.
You can do this today:

cd in terminal:
goto cd <magicword>

open folder in explorer:
goto -f <magicword>

goto should understand what the user prefers and call the corresponding handler if we provide the same word (that points to a folder) without the cd or -f argument.

so TL;DR:
goto word --> automagically opens in folder or in cd.

Create plugin infrastructure that lets plugins register and respond to goto events

Some features that would be nice to have in goto, starts to go well beyond our scope.
However, it would be not cool to dismiss useful features.

To invite the community (if we ever get one) to add new features, without having to deal with all the complexities and internal details in goto - a plugin system could be useful.

Some declarative configurations could be supported:

name: goto-cowsay
handles_schemes: http, https, ftp, file

And the whole thing could be sorta event-based:

def on_add(command, magicword, uri, **options):
    os.system('cowsay "adding magicword {}"'.format(magicword))

goto add <magiword> <directorypath>, not working with relative and absolute paths

Problem - I am standing in my project directory, and I want to add a shortcut to the root of my project.

Experience

jonasjso in ~/git/kvalitetskontroll/kk-vue-components on master
$ project kk-vue-components
active project is now: kk-vue-components

jonasjso in ~/git/kvalitetskontroll/kk-vue-components on master
$ goto add root .
Added magic word root

jonasjso in ~
$ goto root

jonasjso in ~  # < --- still in home directory
$

... This was just using the path .. Maybe a less relative path will work

jonasjso in ~
$ goto add root ~/git/kvalitetskontroll/kk-vue-components
Added magic word root

jonasjso in ~
$ goto root

jonasjso in ~  # < --- still in home directory
$

... Still no luck. I will try with full path this time.

jonasjso in ~/git/kvalitetskontroll/kk-vue-components on master
$ goto add root /Users/jonasjso/git/kvalitetskontroll/kk-vue-components
Added magic word root

jonasjso in ~
$ goto root

jonasjso in ~  # < --- still in home directory
$

What am I missing here?

add slack plugin that allows to goto slack channels

If working in an environment where you have project specific slack channels, it would be a nice feature to be able to add slack shortcuts pointing directly to those.

goto add slack slack://companyslack.slack.com/#prjoject-x

Then running the command goto slack would open slack in that channel.

Core focus of goto - About doing one thing well

In earlier discussions it has been mentioned that goto should follow a core Unix principle of "doing one thing well". For me, that one thing is opening bookmarked webpages from the terminal - cd the internet.
I think that this should be the core focus.

Opening local folders, files and programs, is something that is really well supported in most operating systems already. Imho goto should not try to do this before the core functionality is hammered down.

The early adopters of goto needs a clear message of what goto is, and I feel that focusing on desktop shortcuts in addition to web-chortcuts makes that message harder to clearify.

This post just describes a gut feeling I had, so just wanted to put it out there to get the discussion going.

Make manual page for goto

The help message from goto has begun to become very crowded.

It is time to create a manual for goto, such that man goto works, and gives comprehensive instructions.

That would allow us to show all the aliases for the commands. mv for rename etc.
Found it hard to find space for aliases in #89

goto add - Always be explicit of which protocol you are using (URL) to access resource

Example:

goto add local file:///home/<user>/github/goto
goto add github https://github.com/<user>/goto

For a cleaner look we could allow to ommit the double // like so

goto add local file:/home/<user>/github/goto
goto add github https:github.com/<user>/goto

...or maybe even better

goto add local file /home/<user>/github/goto
goto add github https github.com/<user>/goto

Support -V and --version

These commands should probably show me what version is installed og goto.
I am not entirely sure how we could know the version. Any ideas?

jonasjso in ~
$ project --version
Warning - tried to change to a non existing project.
If you want to create it use the command:

  project add --version

jonasjso in ~
$ goto --version

Ah hoy!

    - The Magic word --version does not exist.

    Are you sure it exists in the project you are in now?
    Type:

        goto list

    to see all shortcuts in this project.
    

jonasjso in ~
$ project -v
Warning - tried to change to a non existing project.
If you want to create it use the command:

  project add -v

jonasjso in ~
$ goto -v

Ah hoy!

    - The Magic word -v does not exist.

    Are you sure it exists in the project you are in now?
    Type:

        goto list

    to see all shortcuts in this project.
    

goto --help should always work

Currently, the check for goto having been fully installed is a bit too strict.
It will always give this warning:

$ goto --help
Ah hoy!

In order to make goto work properly, run this command now:

       install_goto

However - it should be given a warning if install_goto has not yet been run.
I am also thinking of making install_goto be run as a post_install hook from the pip install.

asciicast

Add goto help

A usage guide should be within handy reach of the user.
running goto help, or goto -h or goto /? or goto --help should produce a usage text.

running goto with no arguments, should also show a help text.

Same goes for project help.

goto cd code - nothing happens

jonas in ~
$ project goto
active project is now: goto

jonas in ~
$ goto cd code    # <--- nothing happens

jonas in ~
$ goto list -v
            code --> /usr/local/opt/goto
            goto --> https://github.com/technocake/goto
          github --> https://github.com/technocake/goto

goto add - IOError: [Errno 13] Permission denied: '~/.goto/projects/goto.json'

Terminal Output

jonas in ~/git/technocake/goto on master
$ goto add reddit.space https://www.reddit.com/r/spacex
Traceback (most recent call last):
  File "/usr/local/opt/goto/the_real_goto.py", line 61, in <module>
    magic.save()
  File "/usr/local/opt/goto/gotomagic/magic.py", line 28, in save
    save_magic(self.jfile, self.magic)
  File "/usr/local/opt/goto/gotomagic/magic.py", line 171, in save_magic
    with open(jfile, 'w+') as f:
IOError: [Errno 13] Permission denied: '/home/jonas/.goto/projects/goto.json'

Recording
https://asciinema.org/a/uuT7vQ4GgXN159wqJ2FP8NprQ

Filepath issues on windows / vs \

$ project add goto
touch: cannot touch 'C:\Users\robaab\AppData\Roaming\goto/projects/goto': No such file or directory

cat: 'C:\Users\robaab\AppData\Roaming\goto/active-project': No such file or directory
Ah hoy!

Seems that for some reason, the git bash environment returns windows style pathing.

This could probably be translated via pythons os.path module.
Some investigation must be done on why this happens.

I think it happens in the shell script layers: the bin/goto and bin/project etc.

install fails if username has space

Goto fails on step to create ./goto in the home folder if the user has a space in the username.

Fix: add "" around the home folder variable...

Silence debug output when goto <folderpath> open window

I don't want messages from the window to output to terminal like this

jonas in ~
$ goto add root ~/git/kvalitetskontroll/kk-vue-components
Added magic word root

jonas in ~
$ goto list -v
            root --> /home/jonas/git/kvalitetskontroll/kk-vue-components

jonas in ~
$ goto root       #  <--------------------------- Opening window !!!!!

jonas in ~
$ 
##
## ----------------------- Can we please silence the output below ? --- -------------------
##
(eog:26171): EOG-WARNING **: 23:56:29.150: Failed to open file '/home/jonas/.cache/thumbnails/normal/47141b09e04f032ec7d79ad134c359ed.png': No such file or directory
main.go:192: cannot change mount namespace of snap "gimp" according to change mount (/var/lib/snapd/hostfs/usr/local/share/fonts /usr/local/share/fonts none bind,ro 0 0): cannot create writable mimic over "/usr/": cannot create directory "/tmp/.snap": permission denied
Gtk-Message: 23:57:12.192: Failed to load module "gail"
Gtk-Message: 23:57:12.193: Failed to load module "atk-bridge"
Gtk-Message: 23:57:12.240: Failed to load module "canberra-gtk-module"
Missing fast-path babl conversion detected, Implementing missing babl fast paths
accelerates GEGL, GIMP and other software using babl, warnings are printed on
first occurance of formats used where a conversion has to be synthesized
programmatically by babl based on format description

*WARNING* missing babl fast path(s): "R'G'B' double" to "CIE Lab double"
/snap/gimp/47/usr/bin/gimp: Gimp-Widgets-WARNING: parse_iso_codes: error parsing '/build/gimp/parts/gimp/install/usr/share/xml/iso-codes/iso_639.xml': No such file or directory

*WARNING* missing babl fast path(s): "cairo-ARGB32" to "R'G'B'A u8"
Gtk-Message: 23:57:23.022: Failed to load module "gail"
Gtk-Message: 23:57:23.022: Failed to load module "atk-bridge"
Gtk-Message: 23:57:23.025: Failed to load module "canberra-gtk-module"
*WARNING* missing babl fast path(s): "R'G'B'A u8" to "A double"

(gimp:26247): GLib-GIO-WARNING **: 00:01:23.375: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)

(gimp:26247): GLib-GIO-WARNING **: 00:01:35.451: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
Gtk-Message: 00:01:40.501: Failed to load module "gail"
Gtk-Message: 00:01:40.501: Failed to load module "atk-bridge"
Gtk-Message: 00:01:40.504: Failed to load module "canberra-gtk-module"

goto code - line 25: return: can only `return' from a function or sourced script

jonasjso in ~/git/technocake/goto on master
$ goto list -v 
            code --> /usr/local/opt/goto
            goto --> https://github.com/technocake/goto
          github --> https://github.com/technocake/goto

jonasjso in ~/git/technocake/goto on master
$ goto code
/usr/local/bin/goto: line 25: return: can only `return' from a function or sourced script

add goto origin (git remote)

If the special magicword code points to a git repo, and that git repo has remotes,
perhaps goto should be able to dynamically add a magicword for each remote.

Such that goto origin opens https://github.com/technocake/goto

How far should we take it, and should it perhaps be part of a github plugin? git-plugin?

Goto is using git heavily (soon) internally, and perhaps git should just be understood natively?

What about links like [email protected]:technocake/goto.git which is implicitly git over ssh, or git+ssh:// if you like - and corresponds to the browser-reachable https://github.com/technocake/goto

Should we auto-translate them to https?
I guess that behaviour should be part of github plugin

Installing on my Linux workstation - commands not found

Here is the turn of events on my Linux box

$ ~/git/technocake -> git clone [email protected]:technocake/goto.git
Cloning into 'goto'...
remote: Counting objects: 147, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 147 (delta 4), reused 16 (delta 4), pack-reused 128
Receiving objects: 100% (147/147), 193.94 KiB | 393.00 KiB/s, done.
Resolving deltas: 100% (75/75), done.

$ ~/git/technocake -> ls
goto

$ ~/git/technocake -> cd goto/

$ ~/git/technocake/goto on master -> ls
bin  gotomagic  install_goto.sh  README.md  requirements.txt  the_real_goto.py  win

$ ~/git/technocake/goto on master -> ./install_goto.sh 
ln: failed to create symbolic link '/usr/local/bin/*': Permission denied
./install_goto.sh: line 14: start_goto: No such file or directory
./install_goto.sh: line 17: project: command not found
./install_goto.sh: line 20: project: command not found
./install_goto.sh: line 23: goto: command not found
./install_goto.sh: line 24: goto: command not found
./install_goto.sh: line 25: goto: command not found

$ ~/git/technocake/goto on master -> sudo ./install_goto.sh 
[sudo] password for jonas: 

$ ~/git/technocake/goto on master -> sudo ./install_goto.sh 
[sudo] password for jonas: 
mkdir: cannot create directory ‘/home/jonas/.goto’: File exists
mkdir: cannot create directory ‘/home/jonas/.goto/projects’: File exists
./install_goto.sh: line 14: start_goto: No such file or directory
./install_goto.sh: line 17: project: command not found
./install_goto.sh: line 20: project: command not found
./install_goto.sh: line 23: goto: command not found
./install_goto.sh: line 24: goto: command not found
./install_goto.sh: line 25: goto: command not found

$ ~/git/technocake/goto on master -> goto list

Command 'goto' not found, did you mean:

  command 'gyoto' from deb gyoto-bin
  command 'wgoto' from deb wily
  command 'gotox' from deb dvb-apps
  command 'goo' from deb goo

Try: sudo apt install <deb name>

The contents of the ~/.goto folder after the installation attempt

$ ~/.goto -> find .
.
./active-project
./projects

$ ~/.goto -> cat active-project projects/
cat: projects/: Is a directory

goto add - says it both did and did not update existing magic word

When you use goto add on a magic word that already exist, goto wont add it.
To change an existing magic word, we know use "goto update "

However, the errormessage that displays when goto add is used still says "Magicword added" at the bottom part. It hasnt been added.

This task is about removing that message that says "magic word has been added"

Relevant files: the_real_goto.py

project <projectname> misleading message on non-existing project

When I try to open a project which does not exist

jonasjso in ~
$ project kaffesøndag
active project is now: kaffesøndag  # <--- looks like my project already existed

jonasjso in ~
$ project
kaffesøndag   # < --- looks like the project is active

jonasjso in ~
$ project list
goto
kk-vue-components
kvalitetssystem
                     # < --- missing kaffesøndag

I get a false sense that I have now selected a project which exists. Maybe I should know, but the problem is worse if I do a hard do see spelling mistake on an existing project.

jonasjso in ~
$ project kk-vue-compnents  # < --- spelling mistake
active project is now: kk-vue-compnents

jonasjso in ~
$ project
kk-vue-compnents  # < --- looks ok if I don't pay attention.

jonasjso in ~
$ project list
goto
kk-vue-components  # < -- Looks like the same
kvalitetssystem

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.