Commit Graph

221 Commits

Author SHA1 Message Date
morganamilo
19efb1f121
Foundation for re writing the argument parsing system
Currently the foundation for a new fuller argument parsing has been implemented in
parser.go. Most of the parsing is now done through the argParser object
instead of seperate arrays for options and packages. The rest of the
code still expects the old system so I have left most of the operations
unimplemented for now until I redo it with the new system. Currently
only '-S' and number menu have any functionality for testing purposes.

This new system parses arguments fully instead of just looking for
predefined strings such as:
	'-Sqi' '-Siq'.
This allows:
	'-Syu', '-S -y -u', '--sync -y -u'
to all be parsed as the same.

This system tries to be as similar to pacman as possible, eventually
aming to fully wrap pacman, allowing yay to be used instead of pacman in
all instances.

The current implementation is not as strict as pacman when checking
arguments.  If you pass
--someinvalidflag to yay then yay will simply ignore it. The flag should
still be passed to pacman which should then cause an error.

Although operations '-S' '-R' '-U' ect. are checked to make sure you can not
try to use two operations at once.

conflicting flags such as:
	'--quiet' and '--info'
will not raise an error and which options gains precedence is depend on
the implementation.

Another minor issue which is worth noting is. Due to the way double
arguments are parsed:
	'-dd' '-cc' '--deps --deps'
if you pass the long version and the short version:
	'-d --deps'
yay will not realize its a double argument. Meanwhile pacman will
reconise it when yay calls pacman.

Currently there are a few things that need to be done before this new
system can be fuly released:
	Reimplement all operations to use to new parsing system so that
		the new system is at least as functional as the old one
	Strip yay specific flags before passing them to pacman
	Move parts of config into the argument system and only use
		config for options that are meant to be saved to disk
	Move yay specific operations into its own operator '-Y'
	Update documentation to show the altered syntax
2018-01-04 01:14:25 +00:00
J Guerreiro
1fabad45e2
Updated Pictures and Changelog 2017-12-06 10:11:03 +09:00
Jguer
6305f86a3a
Minor polishing using gometalinter. 2017-12-04 15:24:20 +09:00
Jguer
2ca3f4d726
Fixed man page indenting. 2017-12-04 12:03:10 +09:00
Jguer
4c7f341dd2
References #64. Added optional afterclean. Updates man page. Adds entries to --help 2017-12-04 11:39:23 +09:00
J Guerreiro
22931a77a3
Merge pull request #68 from PietroCarrara/master
Using '-' doesn't raise an error
2017-11-28 11:51:53 +09:00
Pietro Carrara
e0050a63db Using '-' doesn't raise an error 2017-11-27 10:46:18 -02:00
J Guerreiro
3913673c8c
Merge pull request #67 from maximbaz/print_vcs_error_details
Print VCS error details
2017-11-21 13:41:04 +09:00
J Guerreiro
324ff366bc
Merge pull request #66 from maximbaz/truncate_config_files_before_writing
Prevent file corruption by truncating the files
2017-11-21 13:31:16 +09:00
Maxim Baz
fdf41a6418
Print VCS error details 2017-11-21 01:34:27 +01:00
Maxim Baz
34d0f372fd
Prevent file corruption by truncating the files 2017-11-21 00:41:55 +01:00
J Guerreiro
878c606556
Merge pull request #63 from AnthonyLam/issue-49
Add -V and -h for flag parsing
2017-11-12 10:48:27 +09:00
Anthony Lam
ba8e3c98e7 Add -V and -h for flag parsing 2017-11-08 22:00:29 -08:00
Jguer
97bb7d0a9c Merge branch 'updateIgnore' 2017-10-30 21:41:50 +09:00
Jguer
138b0f27dd Check if package is already in upgrade list and skip it. References #60 2017-10-30 21:36:50 +09:00
Jguer
1f29de4805 References #61 2017-10-30 21:19:05 +09:00
Jguer
83e8c54caa ./yay - no longer crashes yay 2017-10-25 17:16:35 +09:00
Jguer
7a8933b8fc Readded showing new update ignored version 2017-10-25 16:17:13 +09:00
Jguer
61a1d46ccd Should resolve #59 2017-10-25 14:42:03 +09:00
Jguer
58ab6fd06f File closure fixed on init 2017-10-19 14:59:26 +09:00
Jguer
a46e6bfa7b Rollback on aggressive permission changes 2017-10-19 11:56:19 +09:00
Jguer
a6a0b9b441 git devel package support restored, house keeping, fixes related to config files. 2017-10-19 11:30:37 +09:00
Jguer
bc7ff1799b Github package updates are back, missing generate Database on fresh installs 2017-10-18 14:46:21 +09:00
Jguer
8fa7c4069e Resolves #57. Added Package ignoring to AUR. Handles made private. 2017-10-18 11:38:19 +09:00
Jguer
b016bf6d53 Added support for XDG_CACHE_HOME, fixes relating to file location not covered in the commit relating to #50. 2017-10-18 11:12:16 +09:00
J Guerreiro
893196bd82 Merge pull request #55 from goggle/typo-readme
Fix two typos in README.md
2017-10-17 11:21:29 +09:00
Alex Seiler
44f4864034 Revert changes in README.md to 'apacman', add hyperlinks 2017-10-17 04:01:56 +02:00
Alex Seiler
f34c413670 Fix two typos in README.md 2017-10-16 20:33:10 +02:00
Jguer
93de8ba9b3 Use XDG_CONFIG_HOME as default config directory instead of hardcoded when available. Fixes #50 2017-10-16 23:38:51 +09:00
J Guerreiro
131e61af5d Merge pull request #53 from whereswaldon/nonexec-config
Make default config file non-executable
2017-10-16 16:46:09 +09:00
J Guerreiro
2e409ae5b6 Merge pull request #51 from whereswaldon/typos
Resolve a few typos in documentation
2017-10-16 16:45:48 +09:00
Chris Waldon
66371b4cfb Make default config file non-executable 2017-10-14 13:01:54 -04:00
Chris Waldon
14c1a17d77 Resolve a few typos in documentation 2017-10-14 12:11:47 -04:00
Jguer
4b78c23fb9 Merged flatten branch 2017-10-03 00:54:34 +09:00
J Guerreiro
771eca9cf7 Merge pull request #48 from afg984/aur-dep
use Command.Dir in aur.PkgInstall; attempt to fix #32 #47
2017-10-03 00:04:55 +09:00
afg
56be9fde2a use Command.Dir in aur.PkgInstall; attempt to fix #32 #47 2017-09-30 23:13:02 +08:00
Jguer
35b975a03c Fixes #45 2017-09-12 11:38:42 +09:00
J Guerreiro
d295a80203 Merge pull request #44 from afg984/uidsuffix
Suffix BuildDir with uid to avoid perm problems
2017-09-06 00:04:01 +09:00
afg
b3826dbb18 Suffix YayConf.BuildDir with uid to avoid permission issues between different users 2017-09-05 10:51:09 +08:00
jguer
9afd66109a FilterPackages replaces ForeignPackages 2017-08-07 14:43:25 +01:00
jguer
ef454680dc Fixed tests for unified structure 2017-08-07 10:53:20 +01:00
jguer
418c27f7e3 Removed empty package 2017-08-07 10:35:21 +01:00
jguer
6e60184078 Fixed parallel update merge 2017-08-07 10:18:19 +01:00
jguer
f7b1cdf990 Merge branch 'master' into flatten 2017-08-07 09:42:02 +01:00
J Guerreiro
263b2facef Further improvements to README
Picture overall is needed as it is outdated
2017-08-05 10:54:09 +01:00
J Guerreiro
8a1d1cd5ee Merge pull request #43 from reujab/readme-improvements
Improved readme
2017-08-05 10:46:05 +01:00
reujab
9fac9805fb improved readme 2017-08-04 21:15:12 -04:00
jguer
226d0f89dd Flatten now compiles 2017-08-04 10:26:53 +01:00
Jguer
262b158a34 Fixes no confirms 2017-08-02 22:56:45 +01:00
Jguer
b4f4a42d50 Flattened architecture. Does not compile 2017-08-02 18:24:03 +01:00